Response.Redirect simply sends a message to the browser, telling it to move to another page. However, the statement Server.Transfer has a number of distinct advantages and disadvantages:
1- Server.Transfer conserves server resources.
2- It works in the web server, not in the user browser. So, it transfers the request and makes your applications run faster.
3- You cant use Server.Transfer to send the user to an external site.
4- Server.Transfer maintains the original URL in the browser. (Can be confuse to debug)
5- The Server.Transfer method also has a second parameter—"preserveForm".
If you set this to True, using a statement such as Server.Transfer("Test2.aspx", True), the existing query string and any form variables will still be available to the page you are transferring to
No comments:
Post a Comment