<% Dim iLoop, yloop
yloop=1
%>
<form method="post" action="using-subroutines-multiple-looped.asp">
First set of Loops<input type="text" name="yloop" /><br
/>
Second set of Loops<input type="text" name="xloop" /><br
/>
Input one
<input type="text" name="yname" /><br />
Input two
<input type="text" name="ysitename" />
<input type="submit" value="Submit" />
</form>
<p>
<%
yname = Request.Form("yname")
ysitename = Request.Form("ysitename")
yloop = Request.Form("yloop")
xloop = Request.Form("xloop")
Sub subHeading
Response.Write("<p align=right>")
Response.Write(yname & "<br />")
Response.Write(ysitename & "<hr />")
End Sub
For iLoop = 1 to yloop
subHeading
Next
%>Second Loop <br /><%
For iLoop = 1 to xloop
subHeading
Next
%>