Link to home
Start Free TrialLog in
Avatar of pr_wainwright
pr_wainwright

asked on

Country & Region Tables MS SQL

Hi,
    I wish to have a web form with 2 DropDownList boxes. The first DropDownList box should be linked to a table of countries & the second linked to a table of regions. When a country is selected in DropDownList box 1 only the applicable regions for that country should appear in list box 2. How do I create the tables/relationships & form to achieve this?.

Thanks
Paul.
Avatar of dfu23
dfu23

Why not use what a large organization has already set as a 'standard' ... like the United Nations, for example:

http://unstats.un.org/unsd/methods/m49/m49regin.htm
From this data you just need to setup some SqlDataSources accordingly to populate your dropdowns ...
Avatar of pr_wainwright

ASKER

dfu23,
           I need to know how to create my own 2 tables & relationships so that I can setup the dropdowns to display only regions applicable to the selected country.

e.g.
CountryTable -
CountryID
CountryName

RegionTable -
RegionID
RegionName
+Some link to Country table so only applicable regions show when dropdown country selected.

If i put 3 countries in the country table
UK
USA
India

& some regions in the region table
Boston
New York
London
Manchester
Mumbai
Goa

Then select USA in dropdownlist box 1 then only Boston & New York should appear in dropdownlist box 2

Thanks
Paul.

ASKER CERTIFIED SOLUTION
Avatar of dfu23
dfu23

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial