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.Item itm = Sitecore.Context.Database.GetItem(someID);
return itm.Paths.Path.ToString();
Produces the following string:
http://localhost/sitecore/content/Home/Item1/Item11/thisItem
I would like to have this string instead:
http://localhost/Item1/Item11/thisItem.aspx
What is the correct way to get the path to the item? In this case I can't use a normal Sitecore link:
Sitecore.Web.UI.WebControls.Link