public void Load_DropDownList_Country() { if (!IsPostBack) { CountryClass co = new CountryClass(); ArrayList list=co.printCountries(1); string item; FavoriteCountryList.Items.Clear(); FavoriteCountryList.Items.Add(new ListItem("", "")); for (int i = 0; i < list.Count;i++) { item = list[i].ToString(); FavoriteCountryList.Items.Add(new ListItem(item, item)); } FavoriteCountryList.DataBind(); } }
//Constructor of copy public CountryClass(CountryClass pais) { nameCountry = pais.NameCountry; }