How to do looping in ASP
S T E P - 1
Open a new text file. Type in the following codes:
<%
Dim intLoop 'Create a new varaible
For intLoop = 1 to 5 'Doing the looping
cResponse.write("This is loop " & intLoop & "
") 'show it
Next ' Continue perform the looping
%>
S T E P - 2
You can also use ASP program to generate the HTML codes.
<%
Dim intLoop 'Create a new varaible
Dim strText
For intLoop = 1 to 5 'Doing the looping
strText = "" 'For this example, we increase the font size by modify the HTML code.
strText = strText & "This is loop " & intLoop & "
"
Response.write(strText) 'show it
Next ' Continue perform the looping
%>
This is the output screen:
No comments:
Post a Comment