Difference between Server.Transfer and response.Redirect.Following are the major differences between them:-
Server.Transfer
- The browser is directly redirected to another page - There is no round trip - A Server transfer is possible within a website - Information can be preserved in Server transfer through a parameter called preserveForm
Response.Redirect
- The browser is requested to redirect to some other page through a message. - There is a round trip. - Response redirect is possible within two websites too. - A state can be maintained in Response redirect but has a lot of drawbacksList the difference between Server.Transfer and Response.Redirect.Server.Transfer
- The Transfer method transfers from inside of one ASP page to another ASP page. - Transfer passes the context information to the called page. - The state information that has been created for an ASP page gets transferred to the other ASP page which comprises of objects and variables within an Application or Session scope, and all items in the Request collections.
Response.Redirect
- The redirect message issues HTTP 304 to the browser and causes browser to go to the specified page. There is round trip between client and server. - Redirect doesn’t pass context information to the called page.
|