SqlRoleProvider.GetAllRoles Method
.NET Framework 3.0
Gets a list of all the roles for the application.
Namespace: System.Web.Security
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
The GetAllRoles method is called by the Roles class to retrieve a list of all the roles in the SQL Server database specified in the ASP.NET application's configuration file (Web.config).
The following code example uses the GetAllRoles method to get the list of roles for an application and bind the results to a System.Web.UI.WebControls.GridView control. For an example of a Web.config file that enables role management, see SqlRoleProvider.
Security Note: |
|---|
|
This example contains a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see Script Exploits Overview (Visual Studio). |
Community Additions
ADD
Show:
Security Note: