Loading
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
Sachin SinghRank #66 · 26.2K reputationPosted Jul 28, 2022, 7:06 AM EDT
If we want to redirect to external website like google or any other website hosted on any other server from our application then we use Response.Redirect,
for internal pages we use Server.Transfer which also preservers the server state and we don't need to do additional round trips.
Amit MohantyRank #112 · 20K reputationPosted Jul 28, 2022, 6:39 AM EDT
Server.Transfer processes the page from one page directly to the next page without making a round-trip back to the client’s browser. This way is faster, with a little less overhead on the server. However, it 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. It does perform a trip back to the client where the client’s browser is actually redirected to the new page. The browser history list is updated to reflect the new address.
For more details check the below links
https://www.c-sharpcorner.com/UploadFile/3d39b4/difference-between-response-redirect-and-server-transfer/
https://www.c-sharpcorner.com/UploadFile/0c1bb2/response-redirect-and-server-transfer-in-Asp-Net/
https://www.dotnettricks.com/learn/aspnet/difference-between-responseredirect-and-servertransfer
Vishal YelveRank #178 · 13.6K reputationPosted Jul 28, 2022, 9:35 AM EDT
Response.Redirect
Server.Transfer
Pushpendra ShuklaRank #552 · 4.4K reputationPosted Jul 29, 2022, 12:36 AM EDT
Response.Redirectsimply tells the browser to visit another page.Server.Transferhelps reduce server requests, keeps the URL the same and, with a little bug-bashing, allows you to transfer the query string and form variables.Jaydeep PatilRank #205 · 11.7K reputationPosted Jul 30, 2022, 12:07 AM EDT