database

May 25, 2007 by Carl Grint
from the database point of view you want a table with a list of countries, then a table with the addresses. You will want to link the Address table to your Countries table...if you have a Country field in the Address table, set it to Number, then assign the ID from the Country table to the Address table...in your admin system create a drop down for the countries, and then assign the ID for the country to the Value of the drop down, that way as you add each country you will enter the ID from the Country table.

Then on the page which will show the Country drop down, you want to create a recordset for the Addresses, with a filter on the Country field, based on a parameter passed.

The example you gave is ASP.net so has extended options over ASP, but you can simply have a form with the countries and the drop down, and have it submit to the same page, then your address/es will show once the Country ID is passed.

A lot to take in I am sure, if you would like, email me, and I can take you through it even more in depth.