How do I get a list of roles for the currently logged in user

Viewed 40442

I want to know what roles a logged in user belongs to without having to check the user against all possible roles (i.e. using Page.User.IsInRole())

2 Answers

using System.Web.Security;

Roles.GetRolesForUser() 

Or

Roles.GetRolesForUser(String) if not targeting the currently logged in user.

Related