Use the For...Next statement to run a block of code a specified number of times.
The For statement specifies the counter variable (i), and its start and end values. The Next statement increases the counter variable (i) by one.
Example
<html>
<body>
<%
For i = 0 To 5
response.write("The number is " & i & "<br />")
Next
%>
</body>
</html>
<body>
<%
For i = 0 To 5
response.write("The number is " & i & "<br />")
Next
%>
</body>
</html>
Practice Excercise Practice now