Form and request object in ASPForms in web pages are very common. We can have signup forms to login forms and many other types of forms in our web pages. Through forms users submit data to the server or interact with the site. This is the way server gets user entered information for further processing. Through a login form when we submit our user id and password, the data reaches the server and is checked against stored user id and password for validation.
Form design is a front end job so html is used to generate different form components to get formatted data from the user. Different form components are used based on the type of data to be entered by the user. For example if the user has to enter the state name of USA then it is better to ask the user to select the state name from a drop down list box (showing the list of states) than asking the user to enter the state name in a input text box.
Once the user submits the form, data processing is done at server side and here we will be using validation at server side scripting language to handle the data. We will learn how to process the form data using ASP ( VBScript ). Such jobs can be handled by other scripting languages like PHP, Perl, JSP etc.
In the form html code we will specify to which page the data is to be send by using action attribute and we will also specify method to tell the form the way data is to be posted. There are two methods to post the data, one is GET and the other one is POST method. Here is the code for basic html form.
<form name=f1 method=post action=file_name.asp>
From the above code we can see the method is specified as post and the action is pointing to file_name.asp. So here we will receive the data of the form in file_name.asp page for processing. To handle the form data in receiving page ASP request object is used. Next we will learn how to use