NoteIf the form method is GET, the QueryString collection will contain all information passed in the form.
Example
When a user completes and submits a form with this HTML:<FORM ACTION="submit.asp" METHOD=POST> Name: <INPUT TYPE=TEXT NAME="name"><P> Favorite Color: <SELECT MULTIPLE NAME="color"> <OPTION>Red <OPTION>Green <OPTION>Blue </SELECT><P> <INPUT TYPE=SUBMIT NAME="cmdSubmit" VALUE="Submit"> </FORM>
You can read the submitted information by using the following script in the submit.asp file:
Request.Form("name") Request.Form("color")
You also can loop through all of the values on a form to extract information passed by the user.
Example
This example loops through all of the standard HTML controls in an HTTP request:<% For Each Item in Request.Form 'Display Item Next %>
If more than one value is submitted for a control on a form, such as a multiselect list box, use the index of the Form collection variable to access the individual values.
Example
This example shows how to access the first and second color value selected in the color list box:Request.Form("color")(0) Request.Form("color")(1)