Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > ASP.NET 4 General Discussion
|
ASP.NET 4 General Discussion For ASP.NET 4 discussions not relating to a specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 4 General Discussion section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 25th, 2012, 06:46 PM
Authorized User
 
Join Date: Dec 2011
Posts: 18
Thanks: 1
Thanked 0 Times in 0 Posts
Default Multiple roles for a singe user ASP.NET

how to find out in code whether a user is having multiple roles assigned and one of them is administrator roles ?
 
Old January 26th, 2012, 06:58 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

You can call Roles.GetRolesForUser(userName) and then iterate over the result.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Query about the USER ROLES in INFOPATH anandhienator Infopath 1 May 2nd, 2007 12:51 PM
Roles and membership asp.net 2 zeeshannasir ASP.NET 1.x and 2.0 Application Design 1 September 22nd, 2006 03:34 AM
Roles and membership asp.net 2 zeeshannasir ASP.NET 2.0 Basics 2 September 15th, 2006 07:24 AM
Retrieving Roles using C# / ADSI in ASP.Net app Prashant.k.m ASP.NET 1.0 and 1.1 Professional 0 October 4th, 2005 04:28 AM
Accessing User Roles in MS Access through Java sfali Java Databases 0 September 24th, 2003 08:12 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.