SaadGilani
IS-IT--Management
Hello all,
I am new to asp.net. I have a checkboxlist consisting of 5 elements. I want these elements to be visible only when another check box is checked. I have written the following code but I get an error message BC30456 as shown at the very bottom of this post.
Regards,
SaadG.hq@keyence.com
******************************
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 AS APPEARS ON MY BROWSER. I HAVE CUT AND PASTED...
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
Source File: E:\HRWeb\list22.aspx Line: 457
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
I am new to asp.net. I have a checkboxlist consisting of 5 elements. I want these elements to be visible only when another check box is checked. I have written the following code but I get an error message BC30456 as shown at the very bottom of this post.
Regards,
SaadG.hq@keyence.com
******************************
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 AS APPEARS ON MY BROWSER. I HAVE CUT AND PASTED...
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
Source File: E:\HRWeb\list22.aspx Line: 457
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++