コード例 #1
0
        private void BindCountry2()
        {
            List <Country> list = new List <Country>();

            list = CountryBLL.GetCountryByContinent(uoDropDownListContinent2.SelectedValue);
            uoDropDownListCountry2.Items.Clear();
            uoDropDownListCountry2.DataSource     = list;
            uoDropDownListCountry2.DataTextField  = "CountryName";
            uoDropDownListCountry2.DataValueField = "CountryID";
            uoDropDownListCountry2.DataBind();


            uoDropDownListCountry2.Items.Insert(0, new ListItem("--Select Country--", "0"));
        }