I have a check box list, using a for loop to loop through the list items of the check box list. Content that is wrapped in a div statement, is being output at the click of the checkbox(not using javascript). The first two items of content show when the checkboxes are selected, but when I uncheck the first check box of the list, the content does not go away, and stays on the page. Here is the code-behind in vb:
Protected Sub cblProd1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cblProd1.SelectedIndexChanged
Try
divFacetsDB.Visible = (cblProd1.SelectedIndex = 1)
divPrdReg1DB.Visible = (cblProd1.SelectedIndex = 2)
For Each cb As ListItem In cblProd1.Items
If cb.Selected = True Then
If cb.Value = "1" Then
divFacetsDB.Visible ...
Go to the complete details ...