Solved

Creating WebPart on SharePoint Services 3.0

Posted on 2012-03-30
2
246 Views
Last Modified: 2012-08-01
Hello Experts,

I am brand new to SharePoint and SharePoint programming. I did some research but couldnt find anything concrete for what I am trying to work on. So giving it a shot here

I have installed Windows SharePoint Services 3.0. I created a site SPPilot. Within it I created a list item called "MYLIST".  The list has the following fields . The data type of the fields are given in brackets.

1. IssueID (integer)
2. Title (string)
3. Due Date (date) (optional)

The list has just 1 row

IssueID              Title                   Due Date
1                       Test123


Now I am not even sure if this is the right way of doing it. But what I want to do is create a new column. Lets call it "Reverse Title" (String). This column essentially is the reverse of the title column. So for example, the Reverse Title column will be "321tset" the reverse of the content of title.

Since I am a complete newbie, the only suggestion I got was to create a webpart and I need to use C# scripting and aspx. I was asked to create a webpart that takes this particular type (string) in our case and then output the results as I described above.

Ive been trying to do this on my own, with whatever examples I can find but nothing has helped and its been 2 weeks so far. Any kind of help would be much appreciated.

Also if you know any further reading that might help me, please point me to those resources as well.

Thanks.
0
Comment
Question by:mashey
  • 2
2 Comments
 
LVL 31

Accepted Solution

by:
Jamie McAllister MVP earned 200 total points
ID: 37789013
Hmmmm. Well a webpart wouldn't have been my first choice.

For a coded solution I'd write an event receiver that reversed the string when the row was created and populated that value into the reverseTitle column.

The guidance on writing an event receiver is here;

http://www.simple-talk.com/dotnet/.net-framework/how-to-create-event-receivers-for-windows-sharepoint-services-3.0/

The C# code to reverse a string is here:

http://www.codegain.com/codesnippets/csharp/miscellaneous/reverse-string-in-csharp-and-vbnet.aspx

Or the strreverse function in VB.NET

A tacky hack non code solution also occurs however which I'll put in the next comment below.
0
 
LVL 31

Expert Comment

by:Jamie McAllister MVP
ID: 37789073
You can create calculated columns in your list. A good article is here;

https://www.nothingbutsharepoint.com/sites/eusp/Pages/endusersharepointcom-taming-the-elusive-calculated-column-customizing-a-contacts-list-part-ii-i.aspx

The string functions are pretty limited alas and dont have a reverse string function, they're more like len, left, mid, right and concatenate.

If your title isn't likely to be too long, you could do a calculated column which extracts each character with a MID() and then concatenates them all with a formula like

=CONCATENATE(MID([Title], 6, 1),MID([Title], 5, 1),MID([Title], 4, 1),MID([Title], 3, 1),MID([Title], 2, 1),MID([Title], 1, 1))
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Work Over Net is a new and very powerful collaboration product. With its new easy interface it is becoming very competitive to other similar products like webex and office interactive. WON 2010 have the standard business tools needed for multi-offic…
I used to be SharePoint evangelist in our company, so my Outlook always full of questions about how to do this, or where I can find that. One day I found such an email with the following question: "how to attach 3-State workflow (one of the workflow…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question