ASP.NET - Membership and Roles

How do I get user roles from a membership provider?

Suppose I have a username and his password and now I need to get his / her assigned roles.

How can i do this?

+2


source to share


1 answer


You want to call a method Roles.GetRolesForUser

:

Gets a list of the roles the user is in.



This method is overloaded and allows you to pass the username to get all roles for a specific user.

+5


source







All Articles