What is the difference between Response.Redirect and Server.Transfer?

Asked 07-Dec-2019
Viewed 624 times

0

What is the difference between Response.Redirect and Server.Transfer


1 Answer


0

These methods like Response.Redirect and Server.Transfer methods both are used to transfer a user from one web page to another web page. Each(both) methods are used for the same purpose but still there are some differences as follows.
Where the Response.Redirect method redirects a request to a new URL and specifies the new URL, while the Server.Transfer method for the current request, terminates execution of the current page and beginning the execution of a new page using the specified URL path of the page.

These methods like Response.Redirect and Server.Transfer has the same syntax like:

Response.Redirect("UserDetail.aspx");
Server.Transfer("UserDetail.aspx");  


Loading...
Ads