tags:

views:

19

answers:

1

Hi friends, I want to display the items in my dropdownlist2 (from table 2 )based on the selected item of the dropdownlist1(from table 1) .

in the following, i just tried to select the lang column values from table2 based on the value which is in the dropdownlist1..((just to insert into the dropdownlist1)) is that correct code...?

SqlDataAdapter da = new SqlDataAdapter("Select lang from table2 where heatre=@d",connect.con()); da.SelectCommand.Parameters.AddWithValue("@d", DropDownList1.SelectedItem.Text); DataSet ds=new DataSet(); da.Fill(ds,"l1"); DropDownList2.Items.Add(ds);

is there any other way to do that...?

A: 

You already asked this question, and we gave you an answer.

http://stackoverflow.com/questions/1392520/inserting-items-to-dropdownlist/1393368#1393368

TestSubject09