Save (Insert) CheckBoxList values to database using jQuery AJAX in ASP.Net

Last Reply 5 months ago By Andrea

Posted 5 months ago

How to insert checkbox values in database

        <div class="row">
            <div class="col-md-4"></div>
            <div class="col-md-4">
                <div class="form-group">
                   
                   <asp:CheckBox runat="server" ID="chkbrkfst" Text="Breakfast" OnCheckedChanged="chkbrkfst_CheckedChanged" AutoPostBack="true" />
                </div>
            </div>
             <div class="col-md-4">
                <div class="">
                    <asp:CheckBoxList runat="server" ID="chkbrkfstli" CssClass="form-control"  Visible="false" RepeatDirection="Horizontal">
                        <asp:ListItem>Veg</asp:ListItem>
                        <asp:ListItem>Non-Veg</asp:ListItem>
                        <asp:ListItem>Italian</asp:ListItem>
                        <asp:ListItem>Mexican</asp:ListItem>
                    </asp:CheckBoxList>
                </div>
                 </div>
            </div>
        
         <div class="row">
            <div class="col-md-4"></div>
            <div class="col-md-4">
                <div class="form-group">
                   
                   <asp:CheckBox runat="server" ID="chklunch" Text="Lunch" OnCheckedChanged="chklunch_CheckedChanged" AutoPostBack="true"  />
                </div>
            </div>
             <div class="col-md-4">
                <div class="">
                    <asp:CheckBoxList runat="server" ID="chklunchli" CssClass="form-control"  Visible="false" RepeatDirection="Horizontal">
                        <asp:ListItem>Veg</asp:ListItem>
                        <asp:ListItem>Non-Veg</asp:ListItem>
                        <asp:ListItem>Italian</asp:ListItem>
                        <asp:ListItem>Mexican</asp:ListItem>
                    </asp:CheckBoxList>
                </div>
            </div>
        </div>

 

You are viewing reply posted by: Andrea 5 months ago.