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.
Below is a simple form that
will send the data using the GET
method. Copy and paste this code
and save it as as "codetellerForm.html".
codetellerForm.html Code:
<form method="GET" action="codeteller.asp">
Name <input type="text" name="Name"/>
Age <input type="text" name="Age"/>
<input type="submit" />
</form>
codetellerForm.html Display (not
functional):
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!
|
|
|
|