I have two CheckBoxLists and I need to be able to set the ListItems selected in one of the CheckBoxList depending on the items selected in the other CheckBoxList.
How can I know which ListItem inside a CheckBoxList had issued the postback? The method must be run at server.
SOLUTION UPDATE:
Final solution i used (thanks to Four):
protected void CheckBoxList1_SelectedIndexChanged(object sender, EventArgs e)
{
var selectedItem = CheckBoxList1.SelectedItem;
}
Where selectedItem is the ListItem that was clicked.
Much simpler: