
February 7th, 2011, 01:33 PM
|
|
Contributing User
|
|
Join Date: Nov 2010
Posts: 39
Time spent in forums: 4 h 32 m 58 sec
Reputation Power: 3
|
|
|
Dynamic drop down list box with sub categories
Hi
I have a dynamic drop down list box,which is displaying all the rows in sql table. But right now I want to divide them with sub categories.
How can i do that one. I can only display normal way without subcategories.
Code:
<table>
<tr><td>Choose Items</td>
<%
OpenSQLConn
SQL = "Select Distinct(item),itemid from items order by item"
Set rs = Conn.Execute(SQL)
%>
<td ><select name="dlist">
<option value="">Please Choose</option>
% Do While Not rs.EOF %>
<option value="<%=rs("item")%>"><%=rs("itemid")%>, <%=rs("item")%></option>
<%
rs.MoveNext
Loop
%>
</select></td></tr></table>
|