in Education by
What is the difference between Server.Transfer and Response.redirect?

1 Answer

0 votes
by

Both Response.Redirect and Server.Transfer methods are used to transfer a user from one web page to another web page. Both methods are used for the same purpose but still there are some differences as follows.

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 starts execution of a new page using the specified URL path of the page.

Both Response.Redirect and Server.Transfer has same syntax like:

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

Before touching on more points I want to explain some HTTP status codes, these are important for the understanding of the basic differences between these two. The HTTP status codes are the codes that the Web server uses to communicate with the Web browser or user agent.

browser

Related questions

0 votes
    What is the difference between HttpContext.Current.Items and HttpContext.Current.Session in ASP.NET?...
asked Apr 7, 2021 in Education by JackTerrance
0 votes
    What is the Difference between session and caching?...
asked Apr 7, 2021 in Education by JackTerrance
0 votes
    What is difference between MVC and Web Forms?...
asked Apr 5, 2021 in Education by JackTerrance
0 votes
    What are the HTML server controls in ASP.NET?...
asked Apr 7, 2021 in Education by JackTerrance
0 votes
    What are the differences between ASP.NET HttpHandler and HttpModule?...
asked Apr 7, 2021 in Education by JackTerrance
0 votes
    What is Data Cache in ASP.NET and how to use?...
asked Apr 8, 2021 in Education by JackTerrance
0 votes
    What is the code behind and Inline Code?...
asked Apr 7, 2021 in Education by JackTerrance
0 votes
    What is authentication and authorization in ASP.NET?...
asked Apr 7, 2021 in Education by JackTerrance
0 votes
    What is Bundling and Minification in MVC?...
asked Apr 5, 2021 in Education by JackTerrance
0 votes
    What are Converters in WPF?...
asked Apr 9, 2021 in Education by JackTerrance
...