This code populates a drop down list with state data from a database table. It creates a SQL command to select all records from the state table, executes the command to get a data reader, clears any existing items from the drop down list, adds a "Select" option, then loops through the data reader to add each state's name and ID as a new list item to the drop down list.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
53 views1 page
Drop Down List
This code populates a drop down list with state data from a database table. It creates a SQL command to select all records from the state table, executes the command to get a data reader, clears any existing items from the drop down list, adds a "Select" option, then loops through the data reader to add each state's name and ID as a new list item to the drop down list.