3
Reply

How to show checked value of Checkboxlist in asp.net

Sanket Jain

Sanket Jain

Dec 29 2014 3:01 AM
1.8k
I'm using CheckBoxList control & in that control I'm using 6 ListItem Control
How to show Checked Value of listitem in updatable form
I got only one value of ListItem so how to get multiple values so that all checked value will be shown in updatable form
Code :
<asp:CheckBoxList ID="chk1" runat="server" AutoPostBack="true"
            onselectedindexchanged="chkSCI_SelectedIndexChanged"
            style="margin-right: 0px" >
    <asp:ListItem Text="aaa" Value="aaa"></asp:ListItem>
    <asp:ListItem Text="bbb" Value="bbb"></asp:ListItem>
    <asp:ListItem Text="ccc" Value="ccc"></asp:ListItem>
    <asp:ListItem Text="ddd" Value="ddd"></asp:ListItem>
    <asp:ListItem Text="eee" Value="eee"></asp:ListItem>
    <asp:ListItem Text="fff" Value="fff"></asp:ListItem>
</asp:ListItem>
    </asp:CheckBoxList>

Answers (3)