Hi,
Sir i want to know what is the difference between Response.redirect() and Server.transfer() method ?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
SenthilkumarPosted Apr 17, 2012, 12:04 AM
For more info:
http://arplis.com/difference-between-server-transfer-and-response-redirect/
Abhimanyu K VatsaPosted Apr 16, 2012, 2:51 PM
Response.Redirect() used on same server to jump from one page to another by maintaining the session variables etc whereas Server.Transfer() is used to send the user on different server and in this case session or other vars will get expire.
Satyapriya NayakPosted Apr 16, 2012, 1:00 PM
Response.Redirect sends a response to the client browser instructing it to request the second page. This requires a round-trip to the client, and the client initiates the Request for the second page. Server.Transfer transfers the process to the second page without making a round-trip to the client. It also transfers the HttpContext to the second page, enabling the second page access to all the values in the HttpContext of the first page
Server.Transfer: client is shown as it is on the requesting page only, but the all the content is of the requested page. Data can be persist across the pages using Context.Item collection, which is one of the best way to transfer data from one page to another keeping the page state alive.
Server.Transfer transfers execution directly to another page. Response.Redirect sends a response to the client and directs the client (the browser) to load the new page (it causes a roundtrip). If you don't need to execute code on the client, Transfer is more efficient.
Thanks