Solved

Creating WebPart on SharePoint Services 3.0

Posted on 2012-03-30
2
237 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

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…
Last week I faced a strange issue recently, i have deployed SharePoint 2003 servers for one project and one of the requirements was to open SharePoint site from same server. when i was trying to open site from the same server i was getting authentic…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

776 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