How to redirect to a different page using Response.Redirect in ASP.NET

You only need to use a simple method for redirecting to an URL in ASP.NET: Response.Redirect(). In the example below we are redirecting to http://www.geekpedia.com:

Response.Redirect(“http://www.geekpedia.com“);

You don’t have to type an absolute URL if the file is located on the same server. In that case you can use relative paths:

Response.Redirect(“NewFile.aspx”);

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top