Hi,
I have 2 html dropdown lists labeled namely: Country and City , as given below:
(Note: It has css class associated with it)
My Database is in SQL Server. And my development environment is Visual Studio 2010.
My database Details:
Table Name: Country_City
Table Name: Country_City
Table view:
|
Country |
City |
| India | Mumbai |
| India | Hyderabad |
| USA | New york |
| USA | California |
My objective:
I have to populate Country Dropdownlist from database using jquer-ajax call.Then on selecting a country the respective cities of that country should be visible in the "City" Dropdownlist.
Please provide the code for the same.
Thanks,
Guest UserPosted Aug 1, 2014, 4:40 AM
you're using webform,
+ use updatepanel control
+ place both dropdowns over that
+ at change of country_change() update city dropdown