1.response.redirect (Http://www.baidu.com,false); The target page and the original page can be on 2 servers, and you can enter a URL or relative path. The bool value that follows is whether to stop the current page from executing. Jumps 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 invoked, it creates an answer that States Code 302 (indicating that the target has changed) and a new target URL is indicated in the reply header. The browser receives the response from the server and uses the information in the answer header to issue a request to the new URL. That is, when the Response.Redirect method is used, the redirection takes place on the client, involving two communications with the server (two back and forth): the first is a request to the original page, a 302 response, and the second is a new page declared in the Request 302 reply, Gets the page after the redirect.
2.server.transfer ("Default2.aspx?name=zhangan", true); The target page and the original page can be on the same server. Jumps to the new page, the original window is replaced. The URL in the Wave Ball Forum browser is the same as the original path. By default, the Server.Transfer method does not pass the form data or query string from one page to another, but as long as the second parameter of the method is set to Tb310true, the form data and query string for the first page can be preserved. At the same time, the use of Server.Transfer should be noted that the target page will use the original page created by the response stream, which led to ASP.net machine verification check b310,, Bo Ball, Bo Net, Connoisseur Heart water, tournament recommendations, race analysis, database, football tournament, basketball, NBA, odds, Score, basketball data, soccer data.
(Machine authentication Check,mac) that the viewstate of the new page has been tampered with. Therefore, if you want to preserve the form data and the collection of query strings for the original page, you must set the enableViewStateMac property of the page directive for the target pages 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, then jump to the original page of the transfer. The URL in the browser is the same as the original path. When the specified ASPX page completes, the control process returns to the location where the original page issued the Server.Execute call. This kind of page navigation is similar to a function call to an ASPX page, where the called page has access to the form data and the collection of query strings that emit the calling page, so set the enableViewStateMac property of the page instruction for the call to False.
4.response.write ("<script language= ' JavaScript ' >window.open (' aaa.aspx ');</script>"); _ The target page and the original page can be on 2 servers, and you can enter a URL or relative path. The original window is reserved and a new page is added.
5.response.write ("<script language= ' javascript ' >window.location= ' default2.aspx ' </script>"); Opens a new page, the original window is replaced.
6.response.write ("<script>window.showmodaldialog (' default2.aspx ') </script>");
7.response.write ("<script>window.showmodelessdialog (' default2.aspx ') </script>");
(a), ShowModalDialog and showModelessDialog What is the difference? ShowModalDialog: The input focus is always maintained when it is opened. The user cannot switch to the main window unless the dialog box is closed. Similar to the running effect of alert. B310,, Bo Ball, Bo Net, expert heart water, tournament recommendations, race analysis, database, football, basketball, NBA, odds, scores, basketball data, football data showmodelessdialog: After being opened, users can randomly switch input focus. Has no effect on the main window (at most, it is blocked.) :P)
(b), how to let the ShowModalDialog and showmodelessdialog hyperlinks do not eject a new window? Add <base target= "_self" to the Web page you've opened. > This sentence is usually placed between
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/csharp/