A Primer on Form Use

Forms exist for one reason—to allow the user to send input to the web server. This input can be used in a vast variety of ways. The input may be web site feedback that is packaged into an email and sent to the webmaster; the input may be search terms for viewing a particular subset of results from a database; the input could be shipping and billing information for an item from an e-commerce web site. Therefore, to collect user input, you must use a form.


Forms play a large role in making the Web truly dynamic. A web site without forms is, most likely, a static web site. Forms have assisted web development by allowing users to visit dynamic web pages whose contents depend upon the user’s input.

When using forms, often two pages are used. The first page is the form creation web page, and contains the HTML code needed to display the form and its elements (text boxes, list boxes, checkboxes, etc.). The second page is the form processing script. This is the ASP page that retrieves the form field values entered by the user and performs whatever processing needs to be done.

The next two subsections detail these two pages. Section 5.2.1 discusses how to generate a form in a web page using the proper HTML code, while Section 5.2.2 details how to read in the form field values entered by a user and make programmatic decisions based upon these values. If you are comfortable with creating forms and reading their values through an ASP page, feel free to skip the following ...

Get Designing Active Server Pages now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.