Beispiel #1
0
    protected void ddlCountry_SelectedIndexChanged(object sender, EventArgs e)
    {
        ddlCountry.Items[0].Enabled = false;
        int     CountryId = int.Parse(ddlCountry.SelectedItem.Value);
        DataSet ds        = StateBusinessLayer.GetStateByCountryId(CountryId);

        BindDDL(ddlState, ds, "StateName", "StateID");
        ddlState.Items.Insert(0, "---Select---");
        lblUpdateAddress.Text = "Plz Select State...";
    }
 protected void ddlCountry_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         int     CountryId = int.Parse(ddlCountry.SelectedItem.Value);
         DataSet ds        = StateBusinessLayer.GetStateByCountryId(CountryId);
         BindDDL(ddlState, ds, "StateName", "StateID");
         ddlState.Items.Insert(0, "SELECT STATE");
     }
     catch (Exception)
     {
         lblMsg.Text = "Plz Select Country Name";
     }
 }