I've my drop down list controls Country,State,City
public void FillCountrys()
{
dt = ad.fillcountry();
dropNativeCountry.DataSource = dt;
dropLivingCountry.DataSource = dt;
dropNativeCountry.DataTextField = "StateName";
dropLivingCountry.DataTextField = "StateName";
dropNativeCountry.DataValueField = "id";
dropLivingCountry.DataValueField = "id";
dropNativeCountry.DataBind();
dropLivingCountry.DataBind();
dropNativeCountry.Items.Insert(0, new ListItem("Select"));
dropLivingCountry.Items.Insert(0, new ListItem("Select"));
}
While selecting the country i'm unable to get the countryCOde to list the sepcific states protected void dropNativeCountry_SelectedIndexChanged(object sender, EventArgs e)
{
FillStates(Convert.ToInt32(dropNativeCountry.SelectedValue.ToString()));
}
If i omit these lines from Binding dropNativeCountry it wrks fine dropNativeCountry.Items.Insert(0, new ListItem("Select"));
dropLivingCountry.Items.Insert(0, new ListItem("Select"));
Join Hands Change lives
Thanks & Regards
Straight Edge Society