Solved

ASP.NET C#.net + Looping through checkboxlist + giving values

Posted on 2009-05-04
3
545 Views
Last Modified: 2013-11-07
I have a checkboxlist that i am populating with the list of ROLES for the website, how do i check the ROLES of the ROLES a certain users are in.
0
Comment
Question by:dkilby
  • 2
3 Comments
 
LVL 15

Expert Comment

by:mohan_sekar
ID: 24295334
Not sure I understand your question....
guessing this is what you are looking for - checkBox1.Items.FindByText("your value") or checkBox1.Items.FindByValue("your value")

0
 

Author Comment

by:dkilby
ID: 24295411
I am using this code to populate the checkboxes

        chkRoleList.DataSource = Roles.GetAllRoles();
        chkRoleList.DataBind();

but am not sure how to get a list of ROLES for an individual user and then check the appropriate checkboxes that match the ROLES the user is in.

I am using the built in ASP membership/roles provider
0
 
LVL 15

Accepted Solution

by:
mohan_sekar earned 500 total points
ID: 24295698
You got to write some code - this link will give more information - http://msdn.microsoft.com/en-us/library/6tc47t75(VS.85).aspx
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

840 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