ASP.NET For ... Next จะทำงานจนเงื่อนไขนั้นเป็นเท็จ ถึงจะกระโดดออกจากลูป
Syntax
For i=1 To 10
Statement Next
Sample
<%@ Page Language="VB" %>
<script runat="server">
Sub Page_Load(sender As Object, e As EventArgs)
Dim i As Integer
For i = 0 To 5
Response.write(i &" ThaiCreate.Com <br>")
Next
Response.write("<hr>")
For i = 0 To 10 Step 3
Response.write(i &" ThaiCreate.Com <br>")
Next
Response.write("<hr>")
For i = 10 To 0 Step -2
Response.write(i &" ThaiCreate.Com <br>")
Next
Response.write("<hr>")
End Sub
</script>