Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create a variable using variables?

Status
Not open for further replies.

raydenl

Programmer
Sep 22, 2003
22
NZ
How do I join 2 variables to create a varible?

e.g.

For i = 1 to Count
Response.Write &quot;<input type='text' name='part_no&quot; & i & &quot;' value = '&quot; & partNo & i & &quot;'>&quot;
Next

So the varible for the 'value' attribute should be partNo1, partNo2, partNo3, etc...

How do I do this?

 
Hello raydenl,

Just guess that partNo1 etc are some variables evaluated at the server. Try something like this?
Code:
For i = 1 to Count
  <%
  sValue=cstr(eval(&quot;partNo&quot; & cstr(i)))
  %>
  Response.Write &quot;<input type='text' name='part_no&quot; &cstr(i) & &quot;'  value = '&quot; & <%=sValue%> & &quot;'>&quot;
Next
regards - tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top