[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 550
  • Last Modified:

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

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
dkilby
Asked:
dkilby
  • 2
1 Solution
 
mohan_sekarCommented:
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
 
dkilbyAuthor Commented:
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
 
mohan_sekarCommented:
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

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now