Solved

CheckBoxList display from codebehind

Posted on 2011-03-10
2
658 Views
Last Modified: 2012-08-13
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
0
Comment
Question by:saloj
2 Comments
 
LVL 13

Expert Comment

by:agarwalrahul
ID: 35106402
0
 
LVL 8

Accepted Solution

by:
Anurag Agarwal earned 500 total points
ID: 35106453
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question