Response.Redirect and Server.Transfer - both are used to move to another page.
1) Response.Redirect asks the browser to move to another page , while Server.Transfer asks the server to transfer to anothe page. Hence it actually conserves server resources. This means you don't get quite as many HTTP requests coming through, which therefore eases the pressure on your Web server and makes your applications run faster. But the "transfer" process can work on only those sites running on the server, you can't use Server.Transfer to send the user to an external site.
2) Server.Transfer has a second argument "PreserveForm". If it is set to true then you can access the controls of previous page even after you have moved to new page. However , it throws some bugs (which can be handled) while sending data in querystring.
3) Also the URL does not change in case of Server.Transfer and the user assumes that it is on the same page. But it might lead to confusion and have difficulties in saving pages as bookmarks.
1) Response.Redirect asks the browser to move to another page , while Server.Transfer asks the server to transfer to anothe page. Hence it actually conserves server resources. This means you don't get quite as many HTTP requests coming through, which therefore eases the pressure on your Web server and makes your applications run faster. But the "transfer" process can work on only those sites running on the server, you can't use Server.Transfer to send the user to an external site.
2) Server.Transfer has a second argument "PreserveForm". If it is set to true then you can access the controls of previous page even after you have moved to new page. However , it throws some bugs (which can be handled) while sending data in querystring.
3) Also the URL does not change in case of Server.Transfer and the user assumes that it is on the same page. But it might lead to confusion and have difficulties in saving pages as bookmarks.
No comments:
Post a Comment