Response.Redirect resolves "~" root path reference.

I like to use ~ to refer to relative to root url paths.It's well described in article “Understanding Paths in ASP.NEThttp://www.informit.com/articles/article.asp?p=101145&seqNum=2  . But I thought that it is always required to call ResolveUrl to make tilde (“~”) working.

However, I found that Response.Redirect does the URL relative resolution anyway and instead of calling

 Response.Redirect(ResolveURL("~/Prva.aspx"))

it can be called just

 Response.Redirect("~/Prva.aspx")


 

posted @ Friday, August 19, 2005 8:39 AM

Print

Comments on this entry:

# re: Response.Redirect resolves "~" root path reference.

Left by Michael Freidgeim at 1/4/2006 1:38 PM
Gravatar
However ClientScriptManager.RegisterClientScriptInclude Method doesn't resolve "~" when it passed in URL parameter.

Your comment:



 (will not be displayed)


 
 
 
Please add 3 and 8 and type the answer here:
 

Live Comment Preview:

 
«December»
SunMonTueWedThuFriSat
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910