File Edit View Insert Format Help

Main Menu
About
Hardware
Software
Links

Form

The Form collection retrieves the values of form elements posted to the HTTP request body, with a form using the POST method.

Syntax

Request.Form(element)[(index)|.Count]

Parameters
element
The name of the form element from which the collection is to retrieve values.
index
An optional parameter that enables you to access one of multiple values for a parameter. It can be any integer in the range 1 to Request.Form(parameter).Count.
Remarks

The Form collection is indexed by the names of the parameters in the request body. The value of Request.Form(element) is an array of all the values of element that occur in the request body. You can determine the number of values of a parameter by calling Request.Form(element).Count. If a parameter does not have multiple values associated with it, the count is 1. If the parameter is not found, the count is 0.

To reference a single value of a form element that has multiple values, you must specify a value for index. The index parameter may be any number between 1 and Request.Form(element).Count. If you reference one of multiple form parameters without specifying a value for index, the data is returned as a comma-delimited string.

When you use parameters with Request.Form, the Web server parses the HTTP request body and returns the specified data. If your application requires unparsed data from the form, you can access it by calling Request.Form without any parameters.

Note� When using ASP and posting large amounts of data beyond 100 kilobytes, Request.Form cannot be used. If your application requires posting data greater than this limit, a component can be written which uses the Request.BinaryRead method.

You can iterate through all the data values in a form request. For example, if a user filled out a form by specifying two values - Chocolate and Butterscotch - for the FavoriteFlavor element, you could retrieve those values by using the following script.

� copyright 2000��� PIVoD Technologies