Response.Redirect simply tells the browser to visit another page.
Server.Transfer helps reduce server requests, keeps the URL the same and, allows you to transfer the query string and form variables
Response.Redirect simply sends a message down to the browser, telling it to move to another page.
Server.Transfer conserves server resources. Instead of telling the browser to redirect, it simply changes the "focus" on the Web server and transfers the request.
which therefore eases the pressure on your Web server and makes your applications run faster.
can't use Server.Transfer to send the user to an external site. Only Response.Redirect can do that
Server.Transfer maintains the original URL in the browser. This can really help streamline data entry techniques, although it may make for confusion when debugging
The Server.Transfer method also has a second parameter—"preserveForm". If you set this to True, using a statement such as Server.Transfer("WebForm2.aspx", True), the existing query string and any form variables will still be available to the page you are transferring to.
So, in brief: Response.Redirect simply tells the browser to visit another page.
Server.Transfer helps reduce server requests, keeps the URL the same and, allows you to transfer the query string and form variables.
No comments:
Post a Comment