Click to See Complete Forum and Search --> : Response.Redirect/Server.Transfer
spoiledkid
Jul 11th, 2005, 03:25 PM
What is the different between these two methods ? They seem to be achieving the same thing.
Grunt
Jul 11th, 2005, 04:27 PM
here ya go...
this explains it all.
apparently server.transfer is for the website only, and response.redirect is for pages outside the scope of your project.
techgnome
Jul 11th, 2005, 04:49 PM
THat's only a part of it.....
In reality.... server.transfer does just that, it transfers processing of the current page to a new location. It can be a new file on a new server, or a new file on the same server. This can be done at any time in the page generation....even after everything has been sent to the browser.
Response.Redirect on the other hand, actualy changes the address in the browser iself, sending it to another address. And it can ONLY happen IF nothing else has yet been sent to the client's browser.
Tg
veryjonny
Jul 12th, 2005, 02:01 PM
Server.tranfer - transfers all the "posted" data from the page it is being transfer to the page transfered to.
Server.Transfer saves a round trip from the server end to the browser.
One limittation, is that you can call ONLY aspx pages with server.transfer and that too those which belong to your site.
Response.redirect is a good as clicking a "Href" link.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.