1 Response.Redirect
This jump page method jumps fast because it wants to go 2 back and forth (2 times postback), but he can jump to any page, no site page limit (ie can be jumped from Yahoo to Sina), and cannot skip login protection. But slow speed is its biggest flaw! REDIRECT Jump mechanism: The first is to send an HTTP request to the client, the notification needs to jump to the new page, and then the client sends a jump request to the server side. It is important to note that all data stored in the internal space after the jump is lost, so the session needs to be used.
2 Server.Transfer
Fast, only need one postback, but .... He must be under the same site because it is a method of server. In addition, he can skip login protection. You can write a small program to try: Design a jump from page to page two, but to enter the page two need to login, form authentication, but if the jump statement using transfer, then it will not pop up the login page. The redirect request for this method occurs on the server side, so the URL of the browser is still reserved for the original page's address!
3 Sever.execute
This page navigation is similar to a function call for an ASPX page, where the called page has access to the form data and query string collection that made the calling page, so the enableViewStateMac property of the page directive of the invoked pages is set to False. By default, the output of the called page is appended to the current reply stream. But The Server.Execute method has an overloaded method that allows the output of the called page to be fetched through a TextWriter object (or its sub-object, such as a StringWriter object), rather than being appended directly to the output stream, so that the location of the called page output can be easily adjusted in the original page.
Summarize:
• Use redirect when you need to redirect users to a page on another server
• When you need to redirect users to non-ASPX pages, such as HTML using redirect
• When the query string needs to be passed to the server as part of the URL, since the other 2 methods cannot do 2 postback, bring the data back to the server first redirect
• Requires conversion between ASPX pages (no login involved) using transfer
• Use the Execute method when you need to insert the output of an ASPX page into another ASPX page.
• If you want to let users decide when to convert a page and which page to go to, the hyperlink works best.
• If you want to use a program to control the target of the transformation, but the timing of the conversion is determined by the user, use the Web server's hyperlink control to dynamically set its NavigateUrl property.
• If you want to connect a user to a resource on another server, use Response.Redirect.
• If you want to keep the query string as part of the URL, use Response.Redirect.
• If you want to transfer the execution process to another ASPX page on the same Web server, You should use Server.Transfer instead of Response.Redirect, because Server.Transfer can avoid unnecessary network traffic for better performance and browsing results.
• If you want to capture the output of an ASPX page and then insert the result into a specific location on another ASPX page, use Server.Execute.
• If you want to ensure that the HTML output is legitimate, use Response.Redirect, and do not use the Server.Transfer or Server.Execute methods.
. NET page Jump Mode "Go"