ASP depth reveal (on)

Source: Internet
Author: User
Tags html form script tag
First, the basic knowledge of ASP
1. ASP is the abbreviation for active Server pages and is an interpreted scripting locale;
2. The operation of the ASP requires Windows operating system, the installation of PWS is required under 9x, and NT/2000/XP needs to install Internet Information Server (IIS);
3. ASP and JSP script tag is "<%%>", PHP can be set to a variety of;
4. The annotation symbol for ASP is "'";
5. Using additional components, you can extend the functionality of the ASP.
Example:
Helloworld_1.asp
<%= "Hello,world"%>
Effect:
Hello,world
Helloworld_2.asp
<%
For I=1 to 10
Response.Write "Hello,world"
Next
%>
Effect:
Hello,world
Hello,world
Hello,world
Hello,world
Hello,world
Hello,world
Hello,world
Hello,world
Hello,world
Hello,world
Note: ASP is case-insensitive; variables need not be defined or used, the conversion is convenient; the grammar check is very loose.
Second, the use of ASP built-in objects:
You can use any of the following ASP built-in objects without having to specifically declare them in ASP scripts.
1. Request:
Definition: Can be used to access the request information sent from the browser to the server, which is used to read information about the HTML form that has been entered.
Set:
Cookies: Contains the value of the browser cookies
Form: Contains values from HTML form fields
QueryString: A value containing a query string
ServerVariables: Contains the values in the header and environment variables
Example:
Request_url.asp
<%
' Get user input and save in variable
User_id=request.querystring ("user_id")
User_name=request.querystring ("user_name")
' Determine if user input is correct
If user_id= "" Then
Response.Write "USER_ID is null,please check it"
Response.End
End If
If User_name= "" Then
Response.Write "User_name is null,please check it"
Response.End
End If
' Print variable
Response.Write user_id& "<br>"
Response.Write User_name
%>
Effect:
When you access http://10.1.43.238/course/request_url.asp?user_name=j:
USER_ID is null,please check it
When you access http://10.1.43.238/course/request_url.asp?user_name=j&user_id=my_id:
my_id
J
Thinking: How are variables passed in URLs and retrieved by ASP pages?
Request_form.htm
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.