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

Looping Controls

VBScript support the For next loop constructs. The following example consists of two forms. The first form accepts a start and end data which it passes to the second from which generates an HTML page with one game line for each day.

<title> For next form</title>
<h2>Weekly Client contacts</h2><br>
<form action="ForNextAction.asp" method=post>
<p> Please enter the first day of the week in the form mm/dd/yy such as 07/01/78</br>
<input type="text" name="start">
<p> Please enter the last day of the week in the same form<br>
<input type=text name="end"><br>
<input type=submit>
<input type=reset>

<title>For next Action</title>
<h2> Weekly games for Harry Potter</h2>
<% varStart=Request.form("start")


For varLineCounter=0 to varNumberdays
response.write "Games:"+varLinCounter+" ___________________"
response.write "<br><br><br>"
signed ________________________

Harry Potter

How it works:

The program retrieves the start and end dates as strings, converts them to dates through cdate function, then subtracts the start from the end to determine the number of game lines to produce. The then loops using the For Next control structure to print out the lines.

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