Export (0) Print
Expand All

RoleServiceManager.LoadRoles Property

Gets or sets a value that indicates whether the list of roles for the currently logged-on user must be retrieved.

Namespace:  System.Web.UI
Assembly:  System.Web.Extensions (in System.Web.Extensions.dll)

public bool LoadRoles { get; set; }

Property Value

Type: System.Boolean
true if the list of roles must be retrieved; otherwise, false. The default is false.

If the LoadRoles property is set to true, the list of roles is retrieved by the RoleServiceManager class by using the Roles.GetRolesForUser method. The list is then serialized into the page markup.

NoteNote

When LoadRoles is true, all the roles that the current authenticated user belongs to are sent to the browser. Because users can potentially see the role information, this can be a security issue.

The LoadRoles property can be specified in the ScriptManager control or in an associated ScriptManagerProxy control. If LoadRoles is set to true for a proxy instance, the list of roles is retrieved and added to the page. If LoadRoles is false, the roles are not added to the page markup. In that case, you can use the Sys.Services.RoleService.load method to store role information in memory in the browser.

.NET Framework

Supported in: 4.5, 4, 3.5

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft