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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP Arrays & Drop Down Boxes

Status
Not open for further replies.

csbelli

Programmer
Apr 13, 2000
1
US
I need to populate a drop down box in ASP with an array. Is this possible and what is the code to do this. Also, how do I know what the array reference number would be for a the user's selection? Any help would be appreciated. Thanks.
 
response.write &quot;&lt;SELECT&gt;&quot;<br>for i = 0 to ubound(a)<br>&nbsp;&nbsp;&nbsp;&nbsp;response.write &quot;&lt;OPTION VALUE=&quot; & i & &quot;&gt;&quot; & a(i) _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& &quot;&lt;/OPTION&gt;&quot;<br>next<br>response.write &quot;&lt;/SELECT&gt;&quot;<br><br>Since you're setting the value of each item to be the array index,&nbsp;&nbsp;that's the value you'll get when the item is selected.<br><br> <p>nick bulka<br><a href=mailto:nick@bulka.com>nick@bulka.com</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top