Exemple #1
0
 protected void loadcountry()
 {
     DropDowncountry.Items.Clear();
     DropDowncountry.DataSource     = mpDetailsBAL.loadCountry();
     DropDowncountry.DataTextField  = "country";
     DropDowncountry.DataValueField = "countryId";
     DropDowncountry.DataBind();
     DropDowncountry.Items.Insert(0, new ListItem("Select Country", "0"));
 }
    protected void loadcountry()
    {
        string eyear = dt1.Rows[0]["country"].ToString();

        DropDowncountry.Items.Clear();
        DropDowncountry.DataSource     = mpDetailsBAL.loadCountry();
        DropDowncountry.DataTextField  = "country";
        DropDowncountry.DataValueField = "countryId";
        DropDowncountry.DataBind();
        DropDowncountry.Items.Insert(0, new ListItem("Select Country", "0"));
        DropDowncountry.Items.FindByText(eyear).Selected = true;
        int x = DropDowncountry.SelectedIndex;

        loadstate();
        // int y = x;
        //DropDowncountry.SelectedIndexChanged(null, null);
    }