Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to redirect from one ASP.NET page to another

How do I redirect from one ASP.NET page to another ("Webform2.aspx") by means of a button?

like image 690
YProgrammer Avatar asked May 10 '11 09:05

YProgrammer


People also ask

How do I redirect a page in CS?

Response. Redirect("~"); Using the HttpContext you can get the current request, response etc. However be careful to always check to ensure the current context is not null, especially if you are calling from your business layer classes.

How do I redirect to another page in net core?

You can use any of the following methods to return a RedirectResult: Redirect – Http Status Code 302 Found (temporarily moved to the URL provided in the location header) RedirectPermanent – Http Status Code 301 Moved Permanently. RedirectPermanentPreserveMethod – Http Status Code 308 Permanent Redirect.


1 Answers

You can redirect from one page to another using Response.Redirect()

like image 100
user746432 Avatar answered Oct 19 '22 10:10

user746432