Web Forms in ASP

The GET Method

The GET method tells the browser to append all data from a submitted form to the URL in the querystring. The server side script can read the querystring with the Request.QueryString object method. The querystring will start with a ? and have variable name-value pairs separated by &'s. Note that values are encoded, ie. they contain hexadecimal ASCII values with leading % signs and spaces are replaced by + signs.

The POST Method

The POST method does not append data as a querystring to the URL. The POST method sends information where data can be read using the Request.Form method object. The POST method can also be used to transmit files from client to server. The ENCTYPE attribute of the FORM object tag defines how to format content.

Form Field Retrieval

Individual fields can be retrieved using the Request.Form("field name") method. Multiple selection form elements can be retrieved in the same way and will be retrieved as a comma delimited list. The Request.Form("field name").Count method will show how many values are contained in that comma delimited list.

Data Validation

Various built-in functions can be used to assess the type of data retrieved.