Monday 21, May 2012
Welcome Guest, Register | Login  
      Home    |    Tutorials    |    Free Ebooks    |    Free Scripts    |    Articles    |    Blog     |    About Us    |    Contact Us

ASP Forms

In ASP you can gather information from HTML Form and use ASP code to process this information to make dynamic web pages. The Request object can be used to retrieve the information from HTML forms.

Request.QueryString

Request.QueryString command is used to get the information of the html form if html form is sending the data using GET method.

Information sent from a form with the GET method is visible in the browser’s address bar also it has limits on the amount of information to send.

Here is a simple HTML form with Get method.

<form name="frmuser" id="frmusr" method="get" action="getuserinfo.asp">
User Name: <input type="text" name="username" /><br />
User Age: <input type="text" name="userage" /><br />
User Country: <input type="text" name="usercountry" /><br />
<input type="submit" value="Submit" />
</form>

Retrieving the form values using Request.QueryString

<%
DIM username, age, country

username = Request.QueryString("username")
userage = Request.QueryString("userage")
usercountry = Request.QueryString("usercountry")

Response.Write("User Name = " & username & "<br>")
Response.Write("User Age = " & userage & "<br>")
Response.Write("User Country = " & usercountry & "<br>")

%>

Request.Form

Request.Form command is used to get the information of the html form if html form is sending the data using POST method.

Information sent from a form with the POST method is not visible in the browser’s address bar it has no limits on the amount of information to send.

Here is a simple HTML form with Get method.

<form name="frmuser" id="frmusr" method="post" action="getuserinfo.asp">
User Name: <input type="text" name="username" /><br />
User Age: <input type="text" name="userage" /><br />
User Country: <input type="text" name="usercountry" /><br />
<input type="submit" value="Submit" />

</form>

Retrieving the form values using Request.Form

<%
DIM username, age, country

username = Request.Form("username")
userage = Request.Form("userage")
usercountry = Request.Form("usercountry")

Response.Write("User Name = " & username & "<br>")
Response.Write("User Age = " & userage & "<br>")
Response.Write("User Country = " & usercountry & "<br>")

%>

 
     
   
ASP Tutorial
 
  ASP Introduction
ASP Introduction
  ASP Syntax
ASP Syntax
  ASP JavaScript
ASP JavaScript
  ASP Variables
ASP Variables
  ASP Arrays
ASP Arrays
  ASP If Statement
ASP If Statement
  ASP Procedures
ASP Procedures
  ASP Functions
ASP Functions
  ASP Sessions
ASP Sessions
  ASP Cookies
ASP Cookies
  ASP Application Object
ASP Application Object
  ASP Forms
ASP Forms
  ASP Comments
ASP Comments
  ASP Email
ASP Email
  ASP ADO
ASP ADO
  ASP File
ASP File
 
 
 
Web Designing Tutorials
  HTML Tutorial
HTML Tutorial
  DHTML Tutorial
DHTML  Tutorial
  CSS Tutorial
CSS Tutorial
  XHTML Tutorial
XHTML Tutorial
 
Programming Languages Tutorials
  C Language Tutorial
C Language Tutorial
  C++ Tutorial
C++ Tutorial
  Java Language Tutorial
Java Language Tutorial
  Data Structure Theory Tutorial
Data Structure Theory Tutorial
 
Server Side Scripting Tutorials
  PHP Tutorial
PHP Tutorial
  SQL Tutorial
SQL Tutorial
  ASP Tutorial
ASP Tutorial
 
Client Side Scripting Tutorials
  JavaScript Tutorial
JavaScript Tutorial
  VBScript Tutorial
VBScript Tutorial
 
 
 
POPULAR E-BOOKS
 
Download Blueprints for a successful presentation  Ebook Blueprints for a successful presentation
   
Download Yahoo Advertiser Work Book  Ebook Yahoo Advertiser Work Book
   
Download Landing Page Success Guide  Ebook Landing Page Success Guide
   
Download The Magic Bullet  Ebook The Magic Bullet
   
Download PHP 5 Power Programming  Ebook PHP 5 Power Programming
   
 
Studiesinn.com © 2012 All Rights Reserved.
Website Designed & Developed by TechXprtz