SaadGilani
New member
I am trying to make a CheckBoxList (consisting of 5 members) invisible unless another check box is checked. I wrote the following code: (but I get the error given at the bottom of my message) Can someone help please!
ERROR MESSAGE GIVEN BELOW:
Compiler Error Message: BC30456: visible is not a member of System.Web.UI.WebControls.ListItem.
Source Error:
Line 455: chkAllTiming.visible=true
Line 456: for i = 0 to chklTiming.items.count - 1
Line 457: chklTiming.items(i).visible = true
Line 458: next
Line 459: else
Code:
Sub chkTimingFilter_CheckedChanged(sender As Object, e As EventArgs)
dim i as integer
if chkTimingFilter.checked = true then
chkAllTiming.enabled=true
chkAllTiming.visible=true
for i = 0 to chklTiming.items.count - 1
chklTiming.items(i).visible = true
next
else
chkAllTiming.enabled=false
chkAllTiming.visible=false
for i = 0 to chklTiming.items.count - 1
chklTiming.items(i).visible = false
next
end if
End Sub
ERROR MESSAGE GIVEN BELOW:
Compiler Error Message: BC30456: visible is not a member of System.Web.UI.WebControls.ListItem.
Source Error:
Line 455: chkAllTiming.visible=true
Line 456: for i = 0 to chklTiming.items.count - 1
Line 457: chklTiming.items(i).visible = true
Line 458: next
Line 459: else
Last edited by a moderator: