Dynamically fill a drop down list from data in a database in Visual Studio
Posted on 2009-04-03
I'm trying to dynamically fill 3 drop down lists from data in my database using Visual Studio.
DDL 1 = States
DDL 2 = Cities
DDL 3 = Zip Codes
DDL 1 should get its data from the database. Then depending on what state is selected in DDL 1, DDL 2 should populate with the Cities for that State. Then DDL 3 should populate with the zip codes available for that city. All drop down lists should get the data from two database tables.
(E.g. DDL 1 I select FL as the State, then DDL 2 populates with Orlando, Jacksonville, Miami, I select Orlando as the City. Then, DDL 3 populates with the zip codes for Orlando.)
How is this accomplished in visual studio?
Thanks for the help