How can i get the actual link from LinkItem.Href? The Href looks something like this:
But i want it to be like this:
If i use @Html.PageLink i get the correct url like above. But it creates an <a> tag with the title from the LinkItem that is clickable with the right url. I only want it to output the url.
To resolve an internally formatted URL like that into a friendly URL, you can get an instance of UrlResolver (from EPiServer.Web.Routing) and call GetUrl() like this:
var friendlyUrl = EPiServer.Web.Routing.UrlResolver.Current.GetUrl(myLinkItem.Href);