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.
The QueryString variable of ASP technology
The form of data we want to reside in the QueryString collection of the requested 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 each of the two items in our QueryString to the variable and then print its value to the page.
saves your ASP file as "tizagget.asp" and stores it in the same directory "tizagform.html".
<%
Dim name, age
name = Request.QueryString ("name")
Age = Request.querystri Ng (' age ')
Response.Write ("Name:" & Name & "<br/>")
Response.Write ("Age: & Age &") <br/> ")
%>