Request Object
All Objects
All Collections
COLLECTION PROPERTY: Request.Form
Request.
Form
(Element)[(Index)|.Count]
The
FORM
collection property contains, and allows you to retrieve, the values of the <FORM> elements posted to a request form using the POST method.
You can iterate through a collection using a
For Each item in ... Next
loop.
There is one mandatory argument.
Element
The
Element
argument is the name of the <FORM> element which is used to retrieve a value.
There is one optional argument.
Index
The
Index
argument is used when the
Element
argument has more than one value. It is an integer, ranging from 1 to
Request.Form(Element).Count
, which is used to select values from a <FORM> element.
Count
is the total number of multiple values.
Code:
-------------------File1.asp------------------------
<HTML>
<HEAD>
</HEAD>
<BODY>
<form action="File2.asp" method="POST">
Name:<input type="Text" name="Name" maxlength="20"><br>
Company:<input type="Text" name="Company" maxlength="20"><br>
Position:<input type="Text" name="Position" maxlength="20"><br>
Address:<textarea name="Address" rows="3"></textarea><br>
Phone:<input type="Text" name="Phone" maxlength="20"><br>
<input type="Submit" name="Submit" value="Submit">
</form>
</BODY>
</HTML>
-------------------File2.asp------------------------
<HTML>
<HEAD>
</HEAD>
<BODY>
<% Response.Write
Request.Form
("Name")%> works for
<% Response.Write
Request.Form
("Company") %> at address
<% Response.Write
Request.Form
("Address") %> as a
<% Response.Write
Request.Form
("Position") %>.<br>
</BODY>
</HTML>
Output:
Jane Doe works for ISSI at address 5609 Kington Pike Knoville, TN as a Web Designer.
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information