Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2009-05-04
3
Medium Priority
?
549 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 2000 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

609 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