CheckBoxList display from codebehind

HI EE,

I have CheckBoxList for category and when I update the page.
1. I want to get the stored value from DB
2. if the category is already in DB then check on the CheckboxList
3. Display all the category list on CheckBoxList on .aspx page

how can I do the task!!!

[.aspx]
 <asp:CheckBoxList ID="CheckBoxList1" runat="server"></asp:CheckBoxList>
 
 [.cs]
 page_load(){
 //SelectedCategory from DB
 //GetCategory(SelectedCategory)
 //CheckBoxList1 add to .aspx page
 }
 
 GetCategory(SelectedCategory){
 // Display all category
 // compare with SelectedCategory
 // Return values
 }

Thank you
LVL 2
salojAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Anurag AgarwalConnect With a Mentor Commented:
0
All Courses

From novice to tech pro — start learning today.