Populating ListBox from Recordset Values

Populating ListBox from Recordset Values


I am trying to populate a drop-down listbox with the data from a table within my database and a blank line. The code I am using is as follows:

Fees Test" &_                        ""             rsGamelvl.MoveNextLoop'close my connectionrsGamelvl.ClosedcGamelvl.CloseSet rsGamelvl = NothingSet dcGamelvl = Nothing%>

Game Level

When I call up the ASP page, the page appears, but the dropdown box is empty. What am I doing wrong?


Your drop-down box is empty because you did not place any values in it.

An HTML drop-down box (a

If you notice your code, you are placing a ‘VALUE=’ property, but you have nothing between your tag pairs. So you have an empty list box.

Change your code to read:

            OptionString = OptionString &_                         ""


Share the Post: