WHoops...I didn't answer your question...
determine what value you want to have as your defaulted selected item. In
this case
<%
'assuming you have your recordset
dim valueToMatch
dim selected
valueToMatch = "25" 'set this to whatever you determine to be this value -
this is just an example
response.write ("<select name=""blah"">" & vbCrLf)
while not rs.eof
if rs("value") = valueToMatch then
selected = "selected"
else
selected = ""
end if
response.write ("<option value=""" & rs("value") & """ " & selected & ">" &
rs("displayName") & "</option>" & vbCrLf)
rs.movenext
wend
response.write ("</select>"
%>
-----Original Message-----
From: Ricki Williams [mailto:[EMAIL PROTECTED]]
Sent: Sunday, August 11, 2002 2:21 AM
To: ActiveServerPages
Subject: preselect dropdown
How can I set the initially selected value in a drop down box to a value
from my recordset like I can for a text box?
I can't seem to figure this one out.
ricki
---
You are currently subscribed to activeserverpages as:
[EMAIL PROTECTED]
To unsubscribe send a blank email to
%%email.unsub%%
---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]