---
title: "CheckBoxList Control in ASP.Net"  
description: "The Checkbox List control is used to create a multi-selection check box group. The Checkbox List Web server control displays a number of checkboxes at"  
author: "Pushpendra Singh"  
published: 2010-10-13  
updated: 2019-11-24  
canonical: https://www.mindstick.com/articles/165/checkboxlist-control-in-asp-dot-net  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 1 minute  

---

# CheckBoxList Control in ASP.Net

## CheckBoxList Control in ASP.Net

The [Checkbox](https://www.mindstick.com/articles/291/how-should-use-checkbox-control-in-vb-dot-net) List [control](https://yourviews.mindstick.com/view/83439/bipartisan-gun-control-bill-passed-in-us-after-decades) is used to create a multi-[selection](https://www.mindstick.com/blog/60/populate-records-in-second-listbox-according-to-the-selection-in-first-list-box) [check](https://yourviews.mindstick.com/view/81033/coronavirus-does-not-check-religion) box group. The Checkbox List [Web server](https://www.mindstick.com/articles/23199/digital-personal-server-the-premium-web-server) control displays a number of checkboxes at once.

<asp:[CheckBoxList](https://www.mindstick.com/forum/352/i-need-to-display-my-checkboxlist-selected-items-in-a-label-how-to-do) ID="CheckBoxList1" runat="server">

<asp:[ListItem](https://www.mindstick.com/forum/23267/insert-a-listitem-to-a-dropdownlist)>c</asp:ListItem>

<asp:ListItem>c#</asp:ListItem>

<asp:ListItem>j#</asp:ListItem>

<asp:ListItem>vb</asp:ListItem>

</asp:CheckBoxList>

![CheckBoxList Control in ASP.Net](https://www.mindstick.com/mindstickarticle/75f78330-82ff-4989-b06b-2975933209a7/images/8b5e3bf5-51a3-4f8b-81d7-1c336f51a757.png)

## CheckBoxList Event:

Checkbox List control raises a SelectedIndexChanged event when users select any check box in the list. By default, the event does not cause the form to be posted to the server, although you can specify this option by setting the AutoPostBack property to true.

<asp:CheckBoxList ID="CheckBoxList1" runat="server" AutoPostBack="True"

onselectedindexchanged="CheckBoxList1_SelectedIndexChanged">

<asp:ListItem>c</asp:ListItem>

<asp:ListItem>c#</asp:ListItem>

<asp:ListItem>j#</asp:ListItem>

<asp:ListItem>vb</asp:ListItem>

</asp:CheckBoxList>

<asp:Label ID="Label1" runat="server"></asp:Label>

protected void CheckBoxList1_SelectedIndexChanged(object sender, EventArgs e)

{

Label1.Text = CheckBoxList1.SelectedItem.Text;

}

![CheckBoxList Control in ASP.Net](https://www.mindstick.com/mindstickarticle/75f78330-82ff-4989-b06b-2975933209a7/images/f29728af-c2a5-4da8-b510-0e23894d2c8e.png)

When you check the [option](https://www.mindstick.com/forum/158788/what-is-rust-s-option-type-and-how-is-it-used-for-handling-nullable-values) given in CheckBoxList then SelectedIndexChanged event will fire and [selected value](https://www.mindstick.com/forum/525/get-selected-value-of-datagridviewcomboboxcolumn) will be displayed in the Label

## We can change CheckBoxList appearance:

<asp:CheckBoxList ID="CheckBoxList1" runat="server" Font-Bold="True"

Font-Italic="True" ForeColor="Red">

<asp:ListItem>c</asp:ListItem>

<asp:ListItem>c#</asp:ListItem>

<asp:ListItem>j#</asp:ListItem>

<asp:ListItem>vb</asp:ListItem>

</asp:CheckBoxList>

![CheckBoxList Control in ASP.Net](https://www.mindstick.com/mindstickarticle/75f78330-82ff-4989-b06b-2975933209a7/images/7c0eee03-f563-4798-8d41-0ebda89cd0a6.png)

---

Original Source: https://www.mindstick.com/articles/165/checkboxlist-control-in-asp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
