The difference between Server.Transfer and Response.Redirect
发表于2004/10/11 15:30:00 522人阅读
You may want to redirect users from one Web Forms page to another page. You might do this to display a page that is matched to the user's browser capabilities or is written in the language that the user speaks.
There are two ways to redirect pages:
- Using a server-side method. In this scenario, the server simply transfers the context to another page. The advantage is that you can share page context information between pages. The disadvantage is that the user's browser does not know about the transfer, so the browser's history is not updated. If the user refreshes the page, unexpected results can occur.
- Using the browser. In this scenario, you send a command to the user's browser that causes the browser to fetch a different page. The advantage is that the browser's history is updated. The disadvantage is that this scenario performs an extra round trip, which can affect performance.
u010119287 2013-04-10 21:43 0
davidcoffee 2011-03-13 22:44 554
zhangpei_xf 2011-07-22 22:14 603
CsethCRM 2011-04-08 11:08 663
chuanzhang5687 2012-02-29 00:17 6932
chengly0129 2012-08-09 16:24 388
tenzone 2013-09-29 23:49 217
Server.Transfer VS Response.Redirect
hongkaihua1987 2011-09-29 23:18 275