C# : Tutorial of Asp.net with c# and example

Example and code about windows application, web application, SQL, C#, WPF etc which is helpful to developer and programer.

Search This Blog

How to bind data in checkboxlist control of asp.net? and property of checkboxlist control

♠ Posted by Unknown in , at Wednesday, August 13, 2014

Checkboxlist: Creates a multi selection check box group that can be dynamically created by binding the control to a data source.

Data bind in CheckBoxList in asp.net following code for aspx page

 <asp:CheckBoxList ID="CheckBoxList1" runat="server"
   DataSourceID="SqlDataSource1" DataTextField="text" DataValueField="text">

Data Bind in CheckBoxList in asp.net following Code write in Code behind page

if (!IsPostback)

CheckBoxList1.DataSource = dataset/datatable/datasource;
CheckBoxList1.DataTextField = "tex";
CheckBoxList1.DataValueField = "text";


Use Full Property pf asp ListBox control as follow:

AppendDataBoundItems, AutoPostBack, CausesValidation, DataTextField, DataTextFormatString, DataValueField, Items, runat, SelectedIndex, SelectedItem, SelectedValue, TagKey, Text, ValidationGroup, OnSelectedIndexChanged

Improve Your Answer as comment below.

If our post is useful please share and comment on our post for more post and detail Visit :



Post a Comment