Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
RoleService Property

ScriptManager.RoleService Property

Gets the RoleServiceManager object that is associated with the current ScriptManager instance.

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

[PersistenceModeAttribute(PersistenceMode.InnerProperty)]
public RoleServiceManager RoleService { get; }

Property Value

Type: System.Web.UI.RoleServiceManager
The RoleServiceManager object for the current ScriptManager instance.

The RoleServiceManager object that is returned by this property represents the role service that is registered with the page. The role service can be defined in the ScriptManager control or in an associated ScriptManagerProxy control. You can use the ASP.NET role service or use a custom role service. You can add the custom service in markup by including a RoleService element inside the asp:ScriptManager element on the page, as shown in the following example:

<asp:ScriptManager ID="SM1" runat="server">
  <RoleService Path="MyRoleService.asmx" LoadRoles="True" />
</asp:ScriptManager>

You can also programmatically configure the RoleServiceManager object. Services are registered with the ScriptManager control during the page's PreRender life-cycle stage.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5
Show:
© 2015 Microsoft