hi,
Can any one tell me what is the main difference between Server.Transfer()
and Response.Redirect()
Thanks
Srikanth
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
Dipa AhujaRank #1,168 · 1.5K reputationPosted Jun 3, 2010, 5:03 AM EDT
Abhimanyu K VatsaRank #14 · 51.7K reputationPosted Jun 3, 2010, 7:30 PM EDT
http://haacked.com/archive/2004/10/06/responseredirectverseservertransfer.aspx
yogesh jadon71 reputationPosted Jun 12, 2010, 1:31 AM EDT
2 round trip,change url,go to any website
server.transfer:
1 round trip,url not change,go to only one domain(IIS) website
zxcoder20 reputationPosted Jun 12, 2010, 4:58 AM EDT
You can redirect them using a Response.redirect("url of new page") method
Response.redirect("url of new page") is called to instruct the web browser to request a different web page by posting back to the original page . Your server side code will then process the postback and then process the Redirect, essentially taking the user to the new page they requested
Server.Transfer("url of new page") terminates execution of the current page and starts executing a new page whose URL is specified as the method parameter.
Differences
The PreviousPage property is not accesible when navigating using the Response.Redirect() whereas its available when using Server.Transfer();
Starting a page using Server.Transfer() does not verify that the current user is authorised to see the page that will be executed whereas the redirect method forces reauthorization to take place.
Server.Tranfer() will generally get to the new page faster than Response.Redirect()