Follow in Twitter & Facebook


Like in Facebook

Powered By Blogger Widgets

Free Download

FREE Tools



Tuesday, March 20, 2012

Server.Transfer() and Response.Redirect() Asp.net









Hey,Friends this is a common question in the interview  What is the difference between Server.Transfer() and Response.Redirect() in Asp.Net? So i am sharing some differences, hope this will help you. You can also check Page Lifecycle Events in ASP.Net.

Server.Transfer():
(1)- Server.Transfer transfers page processing from one page to the next page without making a roundtrip back to the client browser.

(2)- This provides a faster response with a little less overhead on the server.

(3)- Server.Transfer doesn't update the client's url history list or current url.

(4)- Server.Transfer() sends the request to the server.

(5)- It can only take you to the pages with in one application.

(6)- Server.Transfer() is a method of server() is a method of server object which is an instance of System.Web.Http Server Utility class.

Response.Redirect():
(1)- Response.Redirect is used to redirect the user's browser to another page or site.

(2)- This performs a roundtrip back to the client browser.

(3)- Response.Redirect updates the client's url history list or current url.

(4)- Response.Redirect() sends the request to the browser.

(5)- Respose.Redirect can redirect you to any page i.e pages within the application as well as external pages.

(6)- Response.Redirect() is a method of request object which is an instance of System.HttpRequest class.

Also check Connected and Disconnected Architecture Ado.Net.




1 on: "Server.Transfer() and Response.Redirect() Asp.net"