About Me

Friday, 20 April 2012

ASP Forms

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.

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="nullvoidGet.asp">
Name <input type="text" name="Name"/>
Age <input type="text" name="Age"/>
<input type="submit" />
</form>

0 comments:

Post a Comment