SQL PHP HTML ASP JavaScript articles and free scripts to download
 

Form and request object in ASP

Forms 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>
… form components
</form>

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

i) request object in POST method
ii) How to use request object in GET method of form data posting.


Further readings
Form Get method to collect data in ASP script
Form Post method to collect data
Difference between GET and Post method of form submission
Different ways of passing variables with data between pages
Form handling in ASP
Collecting checked radio button value of a HTML form in ASP
Collecting checkbox button value of a HTML form in ASP
 
Scripts
PHP
JavaScript
All ASP Tutorials
Popular Tutorials
Managing two drop downs
ASP Tutorials
Date and time
Declaring array
Form in ASP
Server.MapPath
Date Time & MSSQL
Select Query
File System Object
Subscribe
Submit your email address and receive article and product notifications. Your email is safe with us.