The difference between Server.Transfer and Response.Redirect in ASP.NET

The difference between Server.Transfer and Response.Redirect in ASP.NET

Server.Transfer processes the page from one page directly to the next page without making a round-trip back to the client’s browser. This way is faster, with a little less overhead on the server. However, it does not update the clients URL history list or current URL.

Response.Redirect, as expected, is used to redirect the user’s browser to another page or site. It does perform a trip back to the client where the client’s browser is actually redirected to the new page. The browser history list is updated to reflect the new address.

Share this post

Comments (5)

  • Anonymous Reply

    thank u for useful info…..but if server.transfer is a better is that means we don’t have to use response.redirect any more?

    May 16, 2008 at 10:42 AM
    • Amr Saafan Reply

      Well, it depends on your case. Because you can’t use query string in Server.Transfer, so this is not the perfect solution after all.

      May 17, 2008 at 11:47 AM
      • Mummy Reply

        hi,
        you can use query string with server.transfere if you set the preserveForm param to true.
        and I consider 2 functionality is diff. it’s not the same sport :))

        if you are trying to pass an object to the another page. using the httpcontext. you cant use redirect thing.

        also server.transfer can’t send the user to external site.

        simply redirect tells the browser to visit another page.

        May 18, 2020 at 3:49 PM
  • diseño web malaga Reply

    Wonderful website you have here but I was wondering if you knew of any community forums that cover the same topics talked about
    here? I’d really like to be a part of online community
    where I can get responses from other experienced
    individuals that share the same interest. If you have any
    suggestions, please let me know. Appreciate it!

    October 15, 2020 at 7:48 PM
  • carpe Reply

    Greetings from Ohio! I’m bored to death at work so I decided
    to check out your blog on my iphone during lunch break.
    I love the knowledge you provide here and can’t wait to take a look when I get home.
    I’m shocked at how fast your blog loaded on my phone ..
    I’m not even using WIFI, just 3G .. Anyways, very good blog!

    October 16, 2020 at 9:10 PM

Leave a Reply

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