I know I have done this before but I can\'t seem to remember where or how.
I want to create a link to an Item in Sitecore. This code:
Sitecore.Data.Items
If you are still using Sitecore 5.3, you can use this. Be warned this method is deprecated in Sitecore 6.0.
string url = item.Paths.GetFriendlyUrl();