Home  |  Latest News  |  Contribute  |  F.A.Q.  |  Account  |  Scripts | About
Search ASPNut:
 
ASP Reference
Server Variables
ASP Glossary
Related Sites

Free Components

Web Colors
Entities
CSS Level 1
Encode/Decode
Glossary

Our Sponsors
ASP Nuke CMS
Free Auctions
PHP 5 Script
Funktastic Blog
ULost Directory
Team Task

 

 

 

 

 

 

 

 

 

 

 

 

Do Loop

The Do .. Loop statement is used to create an iteration or repetition of code. It is the most flexible looping mechanism and allows you to create Do While or Do Until loops. The statement Exit Do will force the execution of the innermost loop to cease immediately.

The Do While loop will repeat the enclosing code as long as the condition is true. The Do Until loop will repeat the enclosing code as long as the condition is false.

    I = 3
    Do While I > 0
        Response.Write "I = " & I
        I = I - 1
    Loop

    I = 0
    Do Until I = 6
        Response.Write "I = " & I
        If I = 3 Then Exit Do
        I = I + 1
    Loop

Orvado, San Diego Web Design

ASP Nuke CMS
Free Open Source
Content Manager
GoSwap Auctions
Buy, Sell
No Fees!

Contact Us | Contribute | About | Site Map



"Life is wasted on the living." - Douglas Adams

©2012 San Diego Web Design - Orvado Technologies, All Rights Reserved
ASP Nut provides articles and reference documentation for Active Server Page developers.