|
 |
asp_databases thread: Return Field Entries on a Drop Down
Message #1 by "Balaji Krishnan" <baloo@c...> on Tue, 6 Jun 2000 20:12:39
|
|
Hi,
I wish to list a collection of field values as options in a drop-down
selection list.
e.g.
In database class table under class field
A
B
C
How do I get these to display as
<OPTION SELECTED="SELECTED">A</OPTION><OPTION>B</OPTION> etc..
Thanks in advance
Balaji
Message #2 by "Ken Schaefer" <ken.s@a...> on Wed, 7 Jun 2000 12:00:12 +1000
|
|
<%
If not objRS.EOF
Response.Write("<select name=""select1"">" & vbcrlf)
Do while not objRS.EOF
Response.Write("<option>" & objRS("field1") & "</option>" & vbcrlf)
objRS.movenext
Loop
Response.Write("</select>" & vbcrlf)
End If
%>
The first item will be selected by default.
Cheers
Ken
----- Original Message -----
From: "Balaji Krishnan"
To: "ASP Databases" <asp_databases@p...>
Sent: Tuesday, June 06, 2000 8:12 PM
Subject: [asp_databases] Return Field Entries on a Drop Down
> Hi,
>
> I wish to list a collection of field values as options in a drop-down
> selection list.
>
> e.g.
>
> In database class table under class field
> A
> B
> C
>
> How do I get these to display as
>
> <OPTION SELECTED="SELECTED">A</OPTION><OPTION>B</OPTION> etc..
>
> Thanks in advance
> Balaji
|
|
 |