Hello,
I have the following Script:
<%
For i = 1 to 100
a = a + 1
If a <> 50 then
Response.write(a)
Next
End If
Many More lines of code here
Next
What I want to do is step the for loop UP by one and start the For loop over if the varable "a" is NOT 50. Basically if "a" is NOT 50 then the code under the End If will not get executed and the for loop will increase by one and start over.
If "a" is equal 50 then the first next statement (under the Response.write(a) ) statment should be ignored.
If I place a NEXT statment under the "response.write(a)" statment then the server errors and says "unexpected Next"
Does anyone have a good idea on how to step up the for loop by one and start the for loop again when the "if" condition is true?
Thanks
I have the following Script:
<%
For i = 1 to 100
a = a + 1
If a <> 50 then
Response.write(a)
Next
End If
Many More lines of code here
Next
What I want to do is step the for loop UP by one and start the For loop over if the varable "a" is NOT 50. Basically if "a" is NOT 50 then the code under the End If will not get executed and the for loop will increase by one and start over.
If "a" is equal 50 then the first next statement (under the Response.write(a) ) statment should be ignored.
If I place a NEXT statment under the "response.write(a)" statment then the server errors and says "unexpected Next"
Does anyone have a good idea on how to step up the for loop by one and start the for loop again when the "if" condition is true?
Thanks