![]() |
|
|
Create Loops in ASPLoops allow you to execute the same section of code again and
again thereby saving you time and cutting down on the amount of code you have to write. VBscript has 2 main types of loops. The For...Next loopThe For...Next loop lets you specify the number of times you want the loop to execute. <% The code prints out 1 to 5, the <br> tag puts a line break in between each value; 12 3 4 5 The Do...LoopThe Do...Loop allows you to loop while a condition is true or until a condition becomes true The Do While...Loop<% What the above code does is simply print out the following; 12 3 4 5 6 7 8 The Do Until ...Loop<% Again What the above code does is simply print out the following; 12 3 4 5 6 7 8 Exiting the LoopIf you want to exit the loop then VBscript allows you to;
<%
Site developed by Michael Wall - Web Design Belfast N.Ireland. |
|