London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

page.linkUrl + SiteUrl

Vote:
0
In 4.61 to get a complete URL to a page you could prepend LinkURL with EPiServer.Global.EPConfig.HostUrl. In 5 I tried to do the same thing but with settings.instance.SiteUrl instead and I ended up with a double-slash problem. (http://epi5Test//Templates/Public/Pages/Page.aspx?id=15). Is there any "nice" way to solve this. Of course you can solve it with trimming the strings but it does not feel good. /Henrik
#15877
Nov 16, 2007 11:07
Vote:
0
Hi Henrik! I found some information from an article that does not seem to be published at the moment. Hope that this will help you: - Avoid direct string manipulation. If you want to concatenate two physical paths, use System.lO.Path.Combine - NOT '+'. Check out the types System.IO.Path, System.Web.VirtualPathUtility, System.Uri and System.UriBuilder etc. Always try to find a framework method to manipulate your resource locator - do NOT try to parse or build them by hand if it can be avoided.
#16546
Nov 16, 2007 11:22
Vote:
0
I found it out now. You should use: EPiServer.UriSupport.Combine(
#16547
Nov 16, 2007 13:19
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.