I have Web-App. Somewhere in my page I used following code to create a Hyperlink.
<a href="<%= Eval("NavigateUrl") %>"> <%= Eval("text") %> </a>
as you see this code must be work but there is a little problem. content of NavigateUrl is something like this url.
"~/account/login.aspx"
How I must resolve that URL?
Update : I must say I cant Change value of NavigateUrl cuz that load from Xml-Datasource. I must change that in UI something like:
Eval( Resolveurl("NavigateUrl") )
You can try using Control.ResolveUrl.
Typically you would use
Page.ResolveUrlto resolve a path relative to the current page, andthis.ResolveUrlto resolve a path relative to the current control (UserControl or Page).In your case, the tilde is relative to the application root, so either will do.
In response to your comment, you want to use something like: