Flow control capability in ASP3.0 (2)

Source: Internet
Author: User
asp3| control so there's one less process! Also shorten the server-> client-> server access to each other time! But it is worth reminding you of the point is that the Server.Transfer with the address is the best HTML file or ASP file, not a third party loaded things, such as PHP, if so, the program is not the normal execution, because the file is directly to the ASP's engine analysis (alas , what does Microsoft teach people to say? Do not know this is not considered, or Microsoft's domineering), you will not get the results! In the following program, we will show you this as
Let's take a look at the following code:
(File: response.asp:)
<!--code starts-->
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<meta name= "Author" content= "Ba Junjie" >
<meta name= "Keywords" content= "asp,www.aspcn.com" >
<title>response Test </title>
<body>
<%response.redirect "test.php"%>
</body>
<!--code End-->
The code for the test.php file is as follows:
<!--code starts-->
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<meta name= "Author" content= "Ba Junjie" >
<meta name= "Keywords" content= "asp,php,www.aspcn.com" >
<title>response Test </title>
<body>
? Echo <center> This is a test, Hello! Welcome you to visit our website <a href=http://www.aspcn.com>www.aspcn.com</a></center> ";?>
</body>
<!--code End-->
OK, let's test the code, see the results? Let's take a look at Server.Transfer's usage statement, which is as follows:
Server.asp (in fact, directly apply response.asp on it):
<!--code starts-->
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<meta name= "Author" content= "Ba Junjie" >
<meta name= "Keywords" content= "asp,www.aspcn.com" >
<title>response Test </title>
<body>
<%server.transfer "test.php"%><!--Note this statement-->
</body>
<!--code End-->
Perform a server.asp! Hey, weird, nothing! But if you look at the code that is interpreted by IE, the code is as follows (be careful not to be confused by the comments I use in the HTML below):



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.