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

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


using System.Web.Security;

Roles.GetRolesForUser() 

Or

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


try this if you want to check the currently logged in user for specific role:

Roles.IsUserInRole("Admin")