protected void CountryDrop_SelectedIndexChanged(object sender, EventArgs e) { System.Diagnostics.Debug.WriteLine("Val is:" + CountryDrop.SelectedItem.Value); CityDrop.Items.Clear(); Geography.Cities Cities = new Geography.Cities(); foreach (Geography.Cities City in Cities.GetCities(Convert.ToInt32(CountryDrop.SelectedItem.Value))) { ListItem Li = new ListItem(City.Name, City.ID.ToString()); CityDrop.Items.Add(Li); } }
public List <Geography.Cities> GetCities(int CountryID) { Geography.Cities GeogCities = new Geography.Cities(); return(GeogCities.GetCities(CountryID)); }