I have a form that contains of a gridview and a hidden panel inside an updatepanel. When I click on the gridview header, I will use ModalPopupExtender from ajax to populate the hidden panel and show a checkboxlist for users to chose and then save.
The problem that I'm having is, the selected item from checkboxlist cannot be cleared. For example, I selected first item and click save. After that ModalPopupExtender will be closed. If I click on the gridview header again, when the checkboxlist is populated, the previous selected first item clearly showed that it wasn't selected. Then I select second item from the checkboxlist to save, but this time the system will detect that the first item still selected. So on second save, it will show that I had selected first and second item.
I tried to loop all items and set selected =false but it didn't work. I also tried the below codes but no luck. Please help.
CheckBoxList.EnableViewState = false; CheckBoxList.ClearSelection();