Click here to Skip to main content
15,922,574 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to bind data to checkboxlist in asp.net?????

my code is:-
C#
dt = SysATGlobal.DB.ExecuteSelectQuery("Select SERVICE_SUBCATEGORY_DESC from QAPower.SERVICE_SUBCATEGORY where SERVICE_GROUP_ID='" + business_group_id + "' and SERVICE_CATEGORY_ID='" + business_category_id + "'", false);

           //CheckBoxList1.DataSource = dt;
           //CheckBoxList1.DataBind();
           CheckBoxList1.DataSource = dt;
           CheckBoxList1.DataTextField = "SERVICE_SUBCATEGORY_DESC";
           CheckBoxList1.DataValueField = "SERVICE_SUBCATEGORY_DESC";
           CheckBoxList1.DataBind();


but it not work so plz help me......
Posted
Updated 20-Dec-12 21:12pm
v2
Comments
Suresh Dasari's 21-Dec-12 3:31am    
check dt object value in watch
no issue in binding the code here
[no name] 21-Dec-12 4:28am    
check your data comes or not. your code has no error.

 
Share this answer
 
The code is correct,no problem in your code, Please check your query, may be its not returning resultset.

Thanks
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900