Using the ASP QueryString tutorial

Source: Internet
Author: User
Tags html form

When you pass information from an HTML form, use the Get method to the ASP page from the processing, you can retrieve the data using the ASP's QueryString collection. In the past lessons, we created "tizagform.html" to send Information "tizagget.asp" for processing. The following is the HTML code.

<form method= "Get" action= "tizagget.asp" >
Name <input type= "text" name= "name"/>
Age <input type= "text" name= "age"/>
<input type= "Submit"/>
</form>

Now we need to build our ASP page "tizagget.asp" process to put this data on.

QueryString variables of ASP technology
The form of the data we want to reside in the QueryString collection of the requesting object. Here is a collection of entries for each form input from our HTML form. The key to entering the name attribute of a label is the input that requires access to the data.

Here, we create a simple ASP processor that will store the contents of every two items in our country querystring to variables and then print their value to the page.

Save your ASP file as "tizagget.asp" and store it in the same directory "tizagform.html".

<%
Dim name, age
Name = Request.QueryString ("name")
Age = Request.QueryString (' age ')
Response.Write ("Name:" & name & "<br/>")
Response.Write (' Age: ' & Age & ' <br/> ')
%>

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.