-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I usually do the following:
'get your RS, assume first col is ID, and second is value:
SelectArray = rsTemp.GetRows
rsTemp.Close
Set rsTemp = Nothing
Response.Write("<select name=""test"">")
For X = 0 To Ubound(SelectArray, 2)
If SelectArray(0, X) = PreSelectedValue Then
Response.Write("<option value=""" & SelectArray(0, X) & """
selected>" & SelectArray(1, x)
Else
Response.Write("<option value=""" & SelectArray(0, X) & """>" &
SelectArray(1, x)
End If
Next
Response.Write("</select>")
Ben Timby
Webexcellence
PH: 317.423.3548 x23
TF: 800.808.6332 x23
FX: 317.423.8735
[EMAIL PROTECTED]
www.webexc.com
- -----Original Message-----
From: Ricki Williams [mailto:[EMAIL PROTECTED]]
Sent: Sunday, August 11, 2002 12: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%%
-----BEGIN PGP SIGNATURE-----
Version: PGP 7.0.4
iQA/AwUBPViHp/nby1cCm2Q8EQLb9QCg4dT6TFbrRk/cfNUfgZ/pjdhIydgAoOGt
hl1JDALkD57RNy+2gpLvi2eK
=dgbT
-----END PGP SIGNATURE-----
---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]