mmmmmm, im not so sure either. I have made the asumption you wish to detect which options have been selected previously (form has been submitted and inserted values into the DB) in a standard <select> box
If so here is how I do it:
<td>
<% sql = "SELECT incidentId,incidentName FROM incidentType WHERE incidentInactive <> 1 AND incidentId <> 1 ORDER BY IncidentName"
set getInfo = conn.execute(sql)
response.write "<select name='incidents' style='width:215'>"
response.write "<option value='incidents'>Select Incident Type</option>"
do until getInfo.EoF %>
<option value="<%= getInfo(0) %>" <% if (request.form("incidents") <> "" AND request.form("incidents") <> "incidents") then
if (cint(request.form("incidents")) = cint(getInfo(0))) then
response.write " selected
end if
end if %>><%= getInfo(1) %>
<% getInfo.moveNext
loop%>
</select></td>
Wind is your friend
Matt
|