Roles.IsUserInRole Method

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets a value indicating whether a user is in the specified role.

Namespace:   System.Web.Security
Assembly:  System.Web (in System.Web.dll)

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticIsUserInRole(String)

Gets a value indicating whether the currently logged-on user is in the specified role. The API is only intended to be called within the context of an ASP.NET request thread, and in that sanctioned use case it is thread-safe.

System_CAPS_pubmethodSystem_CAPS_staticIsUserInRole(String, String)

Gets a value indicating whether the specified user is in the specified role. The API is only intended to be called within the context of an ASP.NET request thread, and in that sanctioned use case it is thread-safe.

Return to top
Show: