Solved

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

Posted on 2009-05-04
3
547 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Learn by Doing. Anytime. Anywhere.

Do you like to learn by doing?
Our labs and exercises give you the chance to do just that: Learn by performing actions on real environments.

Hands-on, scenario-based labs give you experience on real environments provided by us so you don't have to worry about breaking anything.

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

728 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