
To populate a dropdown list from a database table,first open a recordset and read from it one record at a time and dynamically write a html dropdown list. <%@ Language=VBScript %> <html> <head> <title> </title> </head> <body> <select name="Employee" size="1"> </select> <% rs.close </body> </html>
<!-- #include file="adovbs.inc" -->
<% 'Create the recordset
set conn=server.createobject("adodb.connection")
set rs = Server.CreateObject("ADODB.Recordset")
conn.open session("connection_string")
set rs = conn.execute("select * from tblEmployee")
%>
<%
do while not rs.eof %>
<%
response.write "<option value=" + Cstr(rs("EmpID")) +">" + rs("EmployeeName")+ "</option>"
rs.movenext
loop
%>
set rs=nothing
conn.Close
set conn = nothing %>
Asp Discussion
- - How to upload files
- - Offshore outsourcing comp
- - Example of editing in Dat
- - Example of Inserting and
- - Example of Image Upload




