private void FillCountryDropDowns() { ddlCountry.Items.Clear(); CountryCollection countryCollection = CountryManager.GetAllCountriesForRegistration(); foreach (Country country in countryCollection) { ListItem ddlCountryItem2 = new ListItem(country.Name, country.CountryId.ToString()); ddlCountry.Items.Add(ddlCountryItem2); } }
private void FillCountryDropDowns() { var ddlCountry = (DropDownList)CreateUserWizardStep1.ContentTemplateContainer.FindControl("ddlCountry"); ddlCountry.Items.Clear(); var countryCollection = CountryManager.GetAllCountriesForRegistration(); foreach (var country in countryCollection) { var ddlCountryItem2 = new ListItem(country.Name, country.CountryId.ToString()); ddlCountry.Items.Add(ddlCountryItem2); } }