How to dynamically generate root folder in link?

Page. ResolveUrl is waiting for an url and won't magically format all urls in the string.

Up vote 0 down vote favorite share g+ share fb share tw.

I'm trying to dynamically generate root folder in a url that's in the body of a mailto hyperlink. Usually I can use page.resolveurl() to do this, but I'm not sure what to do in this case. Right now an email opens in outlook, however in the body of the email the "~" is not replaced by the root folder, but instead just displays "~/z/blog_listing.

Aspx? Fid=489%26id={0}&id=1127. " Here's my code below that I'm having problems with.

Code behind: hypEmail. NavigateUrl = Page. ResolveUrl( "mailto:someone@x.com?

Body=Check out this blog post I found: ~/z/blog_listing. Aspx? Fid=489%26id={0}", cdata.

PostID); mark up page: Thanks! URL2 mailto link|improve this question edited Dec 31 '11 at 8:58Uwe Keim8,87831738 asked Dec 14 '11 at 20:12jre247295 100% accept rate.

Page. ResolveUrl is waiting for an url and won't magically format all urls in the string. You may replace your code with : string url = string.

Format( "~/z/blog_listing. Aspx? Fid=489%26id={0}", cdata.

PostID ); string body = "Check out this blog post I found: " + Page. ResolveUrl(url); hypEmail. NavigateUrl = string.

Format( "mailto:{0}? Body={1}", "someone@x.com", HttpUtility. UrlEncode(body) ).

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions