How to jump on an ASP page

Source: Internet
Author: User

1.response.redirect ("http://www.hao123.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 executing the current page.
Jump to a 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 an answer that indicates the status Code 302 (indicating that the target has changed) and the new destination URL. The browser receives the reply from the server and uses the information in the reply header to make a request to the new URL. Say When using the Response.Redirect method, the redirect operation occurs on the client, which involves a total of two communications with the server (two back and forth): the first is a request to the original page, a 302 response is received, and the second is a new page declared in the request 302 answer, which is the page after the redirect.

2.server.transfer ("Default2.aspx?name=zhangsan", true);
The target page and the original page can be on the same server.
Jump to a new page, the original window is replaced.
The URL in the 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 the form data and query string for the first page can be preserved as long as the second parameter of the method is set to true. At the same time, it should be noted when using Server.Transfer: The target page will use the reply stream created by the original page, which results in the machine validation check (machines authentication Check,mac) of the ASP. ViewState that the new page has been tampered with. Therefore, if you want to preserve the form data and query string collections of the original page, you must set the enableViewStateMac property of the page directive of 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 a new page, then jump to the original page.
The URL in the browser is the same as the original path.
When the specified ASPX page finishes executing, the control flow returns to the original page where the Server.Execute call was made.
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.

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 another new page is added.


5.response.write ("<script language= ' javascript ' >window.location= ' default2.aspx ' </script>");
Open a new page, the original window is replaced.

6.response.write ("<script>window.showmodaldialog (' default.aspx ') </script>");

7.response.write ("<script>window.showmodelessdialog (' defaul.aspx ') </script>");

Source: http://www.cnblogs.com/xiaoxiaoAmeng/archive/2012/08/13/2636464.html

How to jump on an ASP page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.