Solved

Creating WebPart on SharePoint Services 3.0

Posted on 2012-03-30
2
219 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
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Pimping Sharepoint 2007 without Server-Side Code Part 1 One of my biggest frustrations with Sharepoint 2007 in the corporate world is that while good-intentioned managers lock down the more interesting capabilities of Sharepoint programming in…
SharePoint Designer 2010 has tools and commands to do everything that can be done with web parts in the browser, and then some – except uploading a web part straight into a page that is edited in SPD. So, can it be done? Scenario For a recent pr…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

743 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now