I have a Gridview in which i have two templatefields of dropdownlist. I bound them on runtime with same list item.
li = new listitem ("1","1");
dl1.items.add(li);
dl2.items.add(li);
li = new listitem ("2","2");
dl1.items.add(li);
dl2.items.add(li);
li = new listitem ("3","3");
dl1.items.add(li);
dl2.items.add(li);
dl1.selectedvalue = "2";
dl2.selectedvalue = "3";
After executing above, dl1 & dl2 both show me "3" as selected value. Why?
I know the work around of using 2 different listitems while binding but i wanna know why the above happens?