Bookmark and Share

ASP Forms

With ASP you can process information gathered by an HTML form and use ASP code to make decisions based off this information to create dynamic web pages.

Advertise on

An ecommerce site could take the user's information and store it into a database named Customers. This information could then be used to prepopulate the shipping information when the customer is ordering another product.

A forum might save the user's post to a forum by taking the title and body and saving it to a file so that it can then be called later when someone wants to view it.

Create an HTML Form

Before you can process the information, you need to create an HTML form that will send information to your ASP page. There are two methods for sending data to an ASP form: POST and GET. These two types of sending information are defined in your HTML Form element's Method attribute. Also, you must specify the location of the ASP web page that will process the information.

If you would like to revisit HTML Forms check out our HTML Forms Lesson.

Below is a simple form that will send the data using the GET method. Copy and paste this code and save it as as "tizagForm.html".

tizagForm.html Code:

<form method="GET" action="tizagGet.asp">
Name <input type="text" name="Name"/>
Age <input type="text" name="Age"/>
<input type="submit" />

tizagForm.html Display (not functional):

Name Age

Two Form Examples

The next two lessons will cover how to retrieve this HTML Form information using ASP. The first lesson will be for processing data sent with the GET and the second lesson will cover the details for processing POST data. Please continue on!

Bookmark and Share

Found Something Wrong in this Lesson?

Report a Bug or Comment on This Lesson - Your input is what keeps Tizag improving with time!

Advertise Here

More Tutorials!
Microsoft Office Tutorials Artist Tutorials