How can I get the CheckBoxList selected values, what I have doesn’t seem to work C#.NET/VisualWebPart

In your ASPX page you’ve got the list like this: <asp:CheckBoxList ID=”YrChkBox” runat=”server” onselectedindexchanged=”YrChkBox_SelectedIndexChanged”></asp:CheckBoxList> <asp:Button ID=”button” runat=”server” Text=”Submit” /> In your code behind aspx.cs page, you have this: protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { // Populate the CheckBoxList items only when it’s not a postback. YrChkBox.Items.Add(new ListItem(“Item 1”, “Item1”)); YrChkBox.Items.Add(new ListItem(“Item … Read more