it should be a simple question but I can’t figure it out on my own.
I have a page with the path
www.example.com/foo/bar.aspx
And I need to Server.Transfer() from this page to
www.example.com/bla.aspx
the problem is if I do Server.Transfer("bla.aspx") I get an exception
The file '/foo/bla.aspx' does not exist. which is true.
If I do Server.Transfer("/bla.aspx") I get
System.Threading.ThreadAbortException = {Unable to evaluate expression.}
How can I get there? thanks
You need to use the tilde (~) to refer to the root of the directory tree:
Server.Transfer("~/bla.aspx")