The Difference Between Server.Transfer and Response.Redirect

xiaoxiao2021-03-06  80

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 this Scenario Performs An Extra Round Trip, Which CAN Affect Performance.

转载请注明原文地址:https://www.9cbs.com/read-107933.html

New Post(0)