| Topic:
ASP
ASP Forms Forms collect data from the user and post it back to the server for processing. They feature in guest books, feedback pages, shopping carts, search engines, and almost all interactive web sites. In this tutorial, we'll show you how you can use ASP to get at the data that's sent to the web server from a form.
Form Basics
All HTML forms are created using the <FORM> tag:
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. For example.
| Responseform.html |
<html>
<head><title>Asking for information</title></head>
<body>
<form method="post" action="form_response.asp">
Your name: <input type="text" name=" name " size="20"><BR>
Your email: <input type="password" name=" email " size="15"><BR>
<input type="Submit" value="Submit">
</form>
</body>
</html> |
Active Server Pages provide a mechanism for processing forms that, unlike CGI scripting, doesn't involve serious programming: the Request.Form .
Considering the form above, we may create the file bellow and get a response
| Responsform.asp |
<html>
<head><title>Asking for information</title></head>
<body>
<form method="post" action="form_response.asp">
Your name: <input type="text" name=" name " size="20"><BR>
Your email: <input type="password" name=" email " size="15"><BR>
<input type="Submit" value="Submit">
</form>
</body>
</html> |
|