JavaDeploy
SiteMap
Perl 1
Perl 2
ASP
XML
ASP
«Prev
Next»
Intro ASP
Active Server Pages
Server Side Scripting
Script Syntax
Constants Variables
Arithmetic Operators
Decision Statement
Builtin Functions
Response Write
Three Parts
ASP Object Model
Methods Write Scripts
Project Interactive Message
Server Side Conclusion
Browser Server Dialog
Browser Server Communication
Request Query String
ASP Request Cookies
ASP Response Object
122
Customizing User Experience
Advertisement Rotation
Building Webapps
Running ASP Web Application
Running Managing ASP App
Using Global Asa File
App Level Variables
Variables Race Condition
File System Object
Writing Text File
Reading Outputting Files
Write Session Variables
ASP Web App Structure
ASP Request.Form - Exercise
Reading and writing HTML Form data
Objective:
Use ASP to read and write HTML Form data
Background/overview
This lesson illustrated the use of the ASP Request object to read and reference one or more pieces of user data submitted in an HTML Form command using the
POST
method. This exercise will give you the opportunity to create a short ASP script that will do this and then write the data back to your own browser.
Instructions
Write an ASP script named
readform.asp
that will reference and write the contents of the textbox (
txtName
) submitted through HTML Form command in the
postform.html
file.
Downloads
The HTML file,
postform.html
, needed for this exercise is a part of the
asp-scripts.zip
download file located on the course Resources page.
Hints
The HTML page supplied uses the
POST
method to submit the form for processing. The
action
field in the
FORM
command is not filled in. You will need to insert the name of the ASP file into this field.
As in the lesson example, you will be using the Form collection of the Request object to retrieve and reference the data in the textbox field.