Check box list how to get boolean value of the check box list likewise if checked return true if unchecked return false. i tried using for in selected it return true for all the check box.return boolean value based on checked and unchecked
<asp:CheckBoxList ID="ChkPermission" runat="server"
onselectedindexchanged="ChkPermission_SelectedIndexChanged"
style="text-align: left">
<asp:ListItem>Access</asp:ListItem>
<asp:ListItem>Add</asp:ListItem>
<asp:ListItem>Edit</asp:ListItem>
<asp:ListItem>Delete</asp:ListItem>
<asp:ListItem>Print</asp:ListItem>
<asp:ListItem>Export</asp:ListItem>
</asp:CheckBoxList>
I have edited this and posted answer in C# to suit @maccettura. I found this bit of code from here How can I get the CheckBoxList selected values, what I have doesn't seem to work C#.NET/VisualWebPart. There are a few different kind of examples on this link if this code below doesn't work for you.