System.Web.UI.WebControls.LoginView.RoleGroups Property

Gets a collection of role groups that associate content templates with particular roles.

Syntax

[System.Web.UI.Themeable(false)]
[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)]
[System.ComponentModel.MergableProperty(false)]
[System.Web.UI.Filterable(false)]
public RoleGroupCollection RoleGroups { get; }

Value

Documentation for this section has not yet been entered.

Remarks

The LoginView.RoleGroups property contains the content templates associated with various roles on the Web site. The collection in the LoginView.RoleGroups property is searched in the order in which templates are defined in the source. The first matching role-group template is displayed to the user. If a user is a member of more than one role, the first role-group template that matches any of the user's roles is used. If more than one template is associated with a single role, only the first defined template will be used.

If a logged-in user does not belong to any role contained in the role-group collection, the site displays the content template specified in the LoginView.LoggedInTemplate property. Anonymous users are never shown any template contained in the LoginView.RoleGroups collection.

You must configure role management to use the LoginView.RoleGroups property to define templates based on the user's role on the Web site. For more information, see Understanding ASP.NET Role Management.

This property cannot be set by themes or style sheet themes. For more information, see System.Web.UI.ThemeableAttribute and ASP.NET Themes Overview.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0