The request object can receive information from the client and obtain relevant information from the browser, including information passed through the URL parameters, parameters such as post or Get methods in the HTML form, and cookies.
1, read the URL of the parameter information
Pass parameters in the URL, as follows:
http://< URL >/< web page file >?< parameter name >=< value >
If you have more than one parameter, you can use the & connection
Read by Request.QueryString data collection
Example:
Http://re.asp?name=jhong ' pass a parameter
Passed a parameter named: Jhong the value of this parameter is: Jhong
Http://re.asp?name=jhong&pass=123 ' Pass two parameters
Pass two parameters, one parameter name is: Name value is: Jhong
Another parameter name is: Pass value is: 123
How do I get the value of this parameter?
Create a re.asp page and enter the code between the <body></body> of the page:
<%
Name=request.querystring ("name") ' Returns the value of name to the name variable
Pass=request.querystring ("pass") ' returns the value of pass to the passed variable
Response.Write "Your name is:" &name& ", the password is:" &pass ' Print the value of name and pass
%>
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