1. response. Redirect ("http://www.hao123.com", false );
The target page and the original page can be on two servers. You can enter the URL or relative path. The value of bool is whether to stop executing the current page.
Jump to the new page, the original window is replaced.
The URL in the browser is the new path.
The response. Redirect method causes the browser to link to a specified URL. When the response. Redirect () method is called, it creates a response. The response header indicates the status code 302 (indicating that the target has changed) and the new target URL. The browser receives the response from the server and sends a request to the new URL using the information in the response header. This means that response is used. in the Redirect method, the redirection operation occurs on the client, involving two communications with the server (two back and forth) in total: the first request to the original page, and a 302 response is obtained, the second is the new page stated in the 302 response to the request, and the page after the redirection is obtained.
2. server. Transfer ("default2.aspx? Name = zhangsan ", true );
The target page and the original page can be on the same server.
Jump to the new page, the original window is replaced.
The URL in the browser remains the same as the original path.
By default, server. the transfer method does not pass form data or query strings from one page to another, but you only need to set the second parameter of this method to true, the form data and query string of the first page can be retained. At the same time, use server. note that the target page will use the response stream created on the original page, which leads to ASP.. Net machine authentication check (MAC), The viewstate of the new page is deemed to have been tampered. Therefore, to retain the form data and query string set of the original page, you must set the enableviewstatemac attribute of the target page command to false.
3. server. Execute ("default5.aspx? Address = Beijing );
The target page and the original page can be on the same server.
Jump to the new page, and then jump to the original page.
The URL in the browser remains the same as the original path.
When the specified ASPX page is executed, the control process returns to the location where the original page is called by server. Execute.
This page navigation method is similar to calling the callback function for the ASPX page. The called page can access the form data and query string set of the calling page, therefore, set the enableviewstatemac attribute of the called page command to false.
4. response. Write ("<script language = 'javascript '> window. Open ('aaa. aspx'); </SCRIPT> ");
The target page and the original page can be on two servers. You can enter the URL or relative path.
The original window is retained, and a new page is added.
5. response. Write ("<script language = 'javascript '> window. Location = 'default2. aspx' </SCRIPT> ");
Open a new page, and the original window is replaced.
6. response. Write ("<SCRIPT> window. showmodaldialog ('default. aspx ') </SCRIPT> ");
7. response. Write ("<SCRIPT> window. showmodelessdialog ('defaul. aspx ') </SCRIPT> ");