Solved

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

Posted on 2009-05-04
3
541 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now