Response.Transfer And response.Redirect
What is difference between response.redirect and response.Transfer in Asp .net?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Satyapriya NayakRank #47 · 31.5K reputationPosted Sep 30, 2012, 8:38 PM EDT
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
Rajeev KumarRank #1,334 · 1.3K reputationPosted Feb 27, 2023, 2:10 AM EST
Response.Redirect uses Roundtrip It means it send a response to the client and directs the client (the browser) to load the new page .Server.Transfer transfers execution directly to another page.. If you don't need to execute code on the client, Transfer is more efficient.
Tuhin PaulRank #7 · 71.9K reputationPosted Feb 27, 2023, 10:39 PM EST
The key differences between the two methods are:
In general, Response.Redirect is more commonly used than Server.Transfer.