Features
Ask DevGuru
ASP Resources
Find the Bug
Knowledge Base
Links
Tips of the Week
Tutorials
Products
dgCalendar
dgCharge New!
dgChart New!
dgFileUpload
dgReport New!
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Link to Us
Merchandise
Sponsorships
Testimonials
What's New
Technologies
ADO 2.6
ASP
CSS2
HTML
JavaScript
Jet SQL
Transact-SQL Syntax
VBScript
WML
WMLScript
WSH
XML DOM
All Statements
Do....Loop Statement
Exit Statement
For Each....Next Statement
While....Wend Statement
STATEMENT: For
Implemented in version 1.0
For
. . .
Next
The
For
conditional statement repeats a block of code a specified number of times.
You must end all
For
statements with
Next
or you will get an error message. You can place
For
statements inside of other conditional statements. You can use
Exit For
statements to exit out of a
For
loop. The keyword
Step
allows you to loop through a
For
statement in any size of increment.
Code:
<%
For i = 1 To 100
Rem You can place all of the code you desire inside a For loop
Next
%>
<%
For k = 100 To 1 Step -1
Rem You can place all of the code you desire inside a For loop
Next
%>
<%
For mynum = 200 To 200000 Step 200
Rem You can place all of the code you desire inside a For loop
Next
%>
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information