I'm trying to do this:
<a href="~/Cases/SupRequestSearch.aspx">Search request</a>
so I need the ~
to be rendered as http://myserver/app/...
in mvc I would do
<a href="<%=Url.Content("~/Cases/SupRequestSearch.aspx")%>>Search request</a>
is there something similar in asp.net web forms ?
If you don't have either
Url
orPage
you can still useVirtualPathUtility.ToAppRelative(string)
orVirtualPathUtility.ToAbsolute(string)
You still need to be within a web context of course - or this doesn't make sense.
See also : ResolveUrl without an ASP.NET Page
Try this:
or just
As rapadai mentioned above, the equivalent of
in webforms is
Try adding
runat="server"
to your tag.