Hi,
I have two dropdowns.
I want that the DDL2 gets populated based on the values in DDL1.
How can I achieve that.
This is the way I am populating DDL1
string cmd = "Select * from abc ";
SqlDataAdapter da = new SqlDataAdapter( cmd, connection);
DataSet ds = new DataSet();
da.Fill(ds);
DropDownList1.D ataSource = ds;
DropDownList1.D ataTextField = "Name";
DropDownList1.D ataValueField = "Code";
DropDownList1.D ataBind();
DropDownList1.I tems.Insert(0, "--Select--");
I have two dropdowns.
I want that the DDL2 gets populated based on the values in DDL1.
How can I achieve that.
This is the way I am populating DDL1
string cmd = "Select * from abc ";
SqlDataAdapter da = new SqlDataAdapter( cmd, connection);
DataSet ds = new DataSet();
da.Fill(ds);
DropDownList1.D ataSource = ds;
DropDownList1.D ataTextField = "Name";
DropDownList1.D ataValueField = "Code";
DropDownList1.D ataBind();
DropDownList1.I tems.Insert(0, "--Select--");
Comment