Interviews - C# Corner

saradasriram mallela
14. What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other?
By saradasriram mallela in ASP.NET onAug 23 2006
  • Jimmy Vyas
    Jul, 2007 2

    There r 3 diffrences b/w server.transfer and response.redirect

    1. Server.Transfer transfers page processing from one page directly to the next page without making a round-trip back to the client's browser while response.redirect make a round-trip.

    2. By using Response.redirect, you can navigate from one site to other site while with server.transfer, it is not possible.

    3. Server.Tranfer maintain values of previous page while Response.redirect does not maintain this

    • 0
  • manikanta
    Nov, 2006 22

    Adding to saradasriram, we have two more things 1. Response.Redirect can transfer another site while server.Transfer can't transfer to another site i.e it can redirect to the url in same site. 2. previous page data can be access only for the case of server.Transfer method.

    • 0
  • saradasriram mallela
    Aug, 2006 23

    Server.Transfer transfers page processing from one page directly to the next page without making a round-trip back to the client's browser. This provides a faster response with a little less overhead on the server. Server.Transfer does not update the clients url history list or current url. Response.Redirect is used to redirect the user's browser to another page or site. This performas a trip back to the client where the client's browser is redirected to the new page. The user's browser history list is updated to reflect the new address.

    • 0

Most Popular Companies

Most Popular Job Functions

MOST LIKED QUESTIONS