0

aspx page

    <asp:CheckBoxList ID="CheckBoxList1" runat="server">
        <asp:ListItem>Veggie Cheese Burger </asp:ListItem>      
        <asp:ListItem>BBQ Chicken Burger </asp:ListItem>      
    </asp:CheckBoxList></h5>

I tried below code in aspx.vb file but didn't work. It just stores the first checked values. I am struggling to store multiple values

  Session("ptb") = CheckBoxList1.SelectedItem.Text
  • Duplicate of http://stackoverflow.com/questions/18924147/how-to-get-values-of-selected-items-in-checkboxlist-with-foreach-in-asp-net-c – Chetan Jan 29 '17 at 13:31
  • Store the values like this `Session.Add("ptb", CheckBoxList1.Items)` then retrieve them by casting that object (session) back out to a list item collection. Then you will have what you need. Also you are using selected item which is only one.. – Trevor Jan 29 '17 at 13:49

0 Answers0