faqts : Computers : Programming : Languages : Asp : ASP/VBScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

1 of 1 people (100%) answered Yes
Recently 1 of 1 people (100%) answered Yes

Entry

How can I get this to work: str = txt(n).value where n is an incremental number within a loop?

Sep 27th, 2002 09:27
Robin Paardekam, Mandy Anderson, http://www.paardekam.nl


Yes there is... 
I assume that you want to add a value to "str" every time the loop is 
done... (My English is not very good, excuse me for that. Hope you do 
understand all of this.)
Try something like this:
<%
n = 1
TheString = 0
WHILE n < 11
   TheString = TheString & ", " & CStr(n) 
   n = n + 1
WEND
Response.Write "The value of TheString is " & TheString
%>
The value of TheString is 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
Good luck with it, hope thi helps.
Robin Paardekam
http://www.paardekam.nl



© 1999-2004 Synop Pty Ltd