CSDN博客

img liushmh

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.
阅读全文
0 0

相关文章推荐

img
取 消
img