KidsLovePC Contact Us
  Home   PHP  Graphics ASP  JavaScript   J2EE  HTML  JAVA   Swing   Webtip  Forums  Lyric  Free sheet music  Ringtones

Example2: Now assume that for this baseball, everyone needs a team uniform. Your task is to collect size,color from team players.

Programming used: CollectInformation.asp, DealCollection.asp

<title> Form for Uniform</title>
<H1> Base ball uniform</h1>
<h3>Please fill in this form and press submit</h3>
<Form action="dealcollection.asp" method=post>
Your name<input type="text" name="name">
Your size:S, M, L, XL:<input type="text" name="size"></p>
Your color <input type="text" name="color"></p>
<Input type="reset" value="Start over">
<input type="submit" value="Save my preferences" ></p>

How it works: The above code produces 2 text boxes named "size" and "color", along with Submit and Reset button. The resulting form is send to DealCollection.asp.


<title>Uniform information</title>
Dim strName,strSize,strColor
<h1>BaseBall uniform Order

<% Response.write strName %> ordered the following uniform:<br>

Color= <% Response.write strColor %><br>
Size=<% Response.write strSize %><br>

How is works:
Name size and color are passed in the form object and saved in local string variables: strName,strSize and strcolor. The information is then displayed using the Response.Write method.

Saving the information
In the previous example we saved the information as follows:

Dim strName,strSize,strColor

We retrieve the information from the Form object by using Request.Form(XXX) and save it in the local variables for later use.

Displaying the information back to user

In the DealCollection.asp we displayed the saved information using the Response.write method as follows:

<%Response.write strName%>
<%Response.write strSize%>
<%Response.write strColor%>

ASP tutorial
What is ASP
Install IIS
VBScript or JScript
ClientSide vs ServerSide scripting
ASP execution order
Dealing with Form
More Form example
Variable &Variant
Local variable
Global variable
Use if_then_else
Use Select Case
For_Next loop
Do_while loop
Subroutine vs Function
Request Object
Count Keyword
Using QueryString
Application, Method, Events
Create Virtual Directory
Save array in Application
Session, Method, Events
Using Cookie
Server Object
Ad Rotator
Content Linker
Dictionary object
Filesystemobject Object




Best books about ASP & ASP.Net from Amazon
Beginning Dynamic Websites : with ASP.NET Web Matrix (Programmer to Programmer) (Paperback) Build Your Own ASP.NET Website Using C# & VB.NET (Build Your Own) (Paperback) Professional Active Server Pages 3.0 (Programmer to Programmer) (Paperback) ASP.NET Cookbook (Paperback) ASP.NET Kick Start (Paperback)


Printer Inkjet A Z lyricsLearn ChineseHome|PHP|Swing|HTML|JavaScript|ASP|JAVA|Forum|WebTip|Contact Us
Copyright © All rights reserved(new). Privacy|Copyright
designed by

Please help us cover the web site maintenance fee.
barcode scanner Thermal Printer credit card machine bar code printer