|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
Please help
I have this simple script and cannot get my command to execute correctly. Please advise.
<HTML> <HEAD><TITLE>Our First ASP Script</TITLE></HEAD> <H1><B>Our First ASP Script</B></H1> <BODY> Let's Count up to 5. <BR> <HR> <% For iCounter = 1 to 5 call Response.Write(iCounter) <BR> Next%> <HR> </BODY> </HTML> |
|
#2
|
|||
|
|||
|
What I have changed is colored red
<HTML> <HEAD><TITLE>Our First ASP Script</TITLE></HEAD> <H1><B>Our First ASP Script</B></H1> <BODY> Let's Count up to 5. <BR> <HR> <% For iCounter = 1 to 5 Response.Write(iCounter & "<br>") Next %> <HR> </BODY> </HTML> ****************************************** You don't have to "call" the response object. The browser automatically knows that you are making a call to the server. |
|
#3
|
|||
|
|||
|
zimm is correct on the next part of the loop
http://www.shocknet.org.uk/defpage.asp?pageID=28 a link for help... the call keyword actually transfers control to a Sub procedure or Function procedure. You are not required to use the Call keyword when calling a procedure. However, if you use the Call keyword to call a procedure that requires arguments, argumentslist must be enclosed in parentheses. If you omit the Call keyword, you also must omit the parentheses around argumentslist. If you use either Call syntax to call any intrinsic or user-defined function, the function's return value is discarded. EXAMPLE <html> <head> <% sub vbproc(num1,num2) response.write(num1*num2) end sub %> </head><body> <p>Result: <%call vbproc(3,4)%></p> </body></html> |
|
#4
|
|||
|
|||
|
also, your subject name is unacceptable, please use better subject lines in the future.
|
|
#5
|
||||
|
||||
|
for more information on how to post a question please refer to the sticky thread at the top of this forum.
|
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Please help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|