I\'m sure this has been asked time and time again. And yes I\'ve searched. However, I\'m unable to find an example that clearly demonstrates what I\'m looking to accomplis
If your page is on the same directory level you can just use:
Response.Redirect("testing.aspx", false);
If your page is on application root you can use following command:
Response.Redirect("~/testing.aspx", false);
And finally, if you page is inside sub directory from current page you can use:
Response.Redirect("MyFolder/testing.aspx", false);
You can use url relative to web site root.
These urls always start with /
which means 'root'
For Response.Redirect
and any other url you know will be processed by server (like url specified in server control) it's better to start url with ~/
as root, this will help with virtual directories mess.
Use application relative urls. ~/
represents the application root path, so it will work for both /
and /virtual-directory/
.
Response.Redirect("~/testing.aspx");