Hi all,
I have a two DropDownList with multiple CheckBoxes. One for state and other for city. I would like result like when I select multiple CheckBox from state DropDownList. then city dropDownList show both state city with Multiple CheckBox.
Loading


Ruchi H105 reputationPosted Jul 23, 2013, 5:11 AM EDT
Rohatash KumarRank #12 · 57.7K reputationPosted Jul 23, 2013, 5:15 AM EDT
But is not answer of my problem. Please read it and try again.
Iftikar HussainRank #423 · 5.9K reputationPosted Jul 23, 2013, 7:59 AM EDT
Please refer the below link
http://www.codeproject.com/Articles/42247/ASP-NET-Multiple-Selection-DropDownList-with-AJAX
http://www.codeproject.com/Articles/66572/A-Multiple-Selection-DropDownList-a-CheckBoxList-I
Regards,
Iftikar
selva kumarRank #2,987 · 483 reputationPosted Jul 24, 2013, 3:21 AM EDT
selva kumarRank #2,987 · 483 reputationPosted Jul 24, 2013, 4:44 AM EDT
If(checkbox1.checked)
{
SqlCommand Cd = new SqlCommand("Select state from table name", Con);
SqlDataReader dr = Cd.ExecuteReader();
while (dr.Read())
{
dropdownlist1.Items.Add(dr["state"].ToString());
}
SqlCommand Cd1 = new SqlCommand("Select city from table name", Con);
SqlDataReader dr1 = Cd1.ExecuteReader();
while (dr1.Read())
{
dropdownlist2.Items.Add(dr["city"].ToString());
}
}