Hi all,
I am creating two drop down lists inside a gridview using the itemTemplate. ie
<
</
In c# code, i am trying to change the values of the second drop down list based on the value selected in the first. I am doing this as below:
foreach
{
ddl.Items.Clear();
}
SPComm.CommandType =
dr = SPComm.ExecuteReader(); //dr is sqlDataReader
ddl.Items.Insert(i, dr.GetString(0));
In the above code, all the values in the second drop down list are getting duplicated based on the selected index changed event handler of the first drop down list. Can anyone help me with this?