PDA

View Full Version : populating ComboBox


Abd
10-03-2002, 11:07 AM
Hi,

I use the below code to populate textBox;
<input name="address" type="text" value="<%=Server.HTMLEncode(address)%>

How do I populate a ComboBox?

Thanks

Abd

glenngv
10-03-2002, 12:15 PM
<select>
<%
for i=0 to 2
response.write "<option value='" & i & "'>"&i&"</option>" & VbCrLf
next
%>
</select>

the output would be:

<select>
<option value='0'>0</option>
<option value='1'>1</option>
<option value='2'>2</option>
</select>