This documentation is archived and is not being maintained.

RoleGroupCollection Class

Contains a sequential list of role groups that the LoginView control uses to determine which control template to display to users based on their role. This class cannot be inherited.

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)

public sealed class RoleGroupCollection : CollectionBase
public final class RoleGroupCollection extends CollectionBase
public final class RoleGroupCollection extends CollectionBase
Not applicable.

The RoleGroupCollection class manages the list of role groups associated with a particular LoginView template. Each role group defines the content and controls to display to a particular group of users on your Web site. It is possible to assign several role groups to the same template.

To find the role group in the collection that a particular user belongs to, you can use the GetMatchingRoleGroup method to search the collection by user name.

Caution noteCaution:

The order of the roles in the RoleGroupCollection collection is important because matching is done sequentially based on the first role found.

You must configure role management to use the RoleGroupCollection class to manage a list of role groups. For more information, see Understanding Role Management.

  • AspNetHostingPermission  for operating in a hosted environment. Demand value: LinkDemand; Permission value: Minimal.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0