View Full Version : Load from database to a combo box
how to load the informations from database to a combo box using asp...eg:type of courses available...plz help
This will work...
Modify the html code if you have to. Also, replace the SQL statement in the conn.Execute call.
<select name="list">
<%
' Note: conn is your connection object
Set RS = conn.Execute("select column_name from table")
If Not RS.EOF Then
Do Until RS.EOF
Response.Write("<option>" & RS("column_name") & "</option>")
RS.MoveNext
Loop
End If
RS.Close
Set RS = Nothing
conn.Close
Set conn = Nothing
%>
</select>
vBulletin® v3.6.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.