You must Sign In to post a response.
  • Category: ASP.NET

    Server.Transfer and Response.Redirect

    What is the difference between Server.Transfer and Response.Redirect?
  • #769818
    Both are used for redirection purpose.The main difference is that in Response.Redirect round-trip is possible whereas in case of Server.Transfer it is not possible.Another thing is that through Response.Redirect we can not only redirect from one page to other page but also from one domain to other domain and from one server to other server whereas in case of Server.Transfer Page redirection is restricted only to that application server or page redirection is possible with the same server.

    Not:- Round-Trip means a complete cycle from client to the server.For example, the browser sends the form back to the server, including the fact that the button is clicked , the server processes the code that is attached to the button click event, creates a new page with the latest state of the page, and sends it back to the browser.

  • #769878
    Hi,

    Gothrough the URL its use full.

    https://www.c-sharpcorner.com/UploadFile/3d39b4/difference-between-response-redirect-and-server-transfer/

    Regards
    Sriram.R

  • #769947
    i think the above comments are enough for the differences of server.transfer and response.redirect, but i want to add cases when we need to use these both statements in asp.net

    Response.Redirect used for both .aspx and html pages whereas Server.Transfer can be used only for .aspx pages and it is specific to ASP and ASP.NET.
    Response.Redirect can be used to redirect a user to an external websites.
    Server.Transfer can be used only on sites running on the same server.

    Thanks!
    B.Ramana Reddy


  • Sign In to post your comments