This documentation is archived and is not being maintained.

RoleGroup Class

Note: This class is new in the .NET Framework version 2.0.

Associates a content template in a LoginView control with one or more roles defined for the Web site. This class cannot be inherited.

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

public ref class RoleGroup sealed
public final class RoleGroup
public final class RoleGroup

You can use the LoginView control to define a set of content templates that contain the content that is displayed to Web site users based on the role assigned by Web site administrators. The RoleGroup class is used by the LoginView control to associate a content template with a set of roles.

To dynamically assign a template to the role group, set the ContentTemplate property to a reference to an object that implements the ITemplate interface.

You must configure role management to use the RoleGroup class. For more information, see Understanding Role Management.

The following code example assigns a custom template to the ContentTemplate property.

No code example is currently available or this language may not be supported.

System.Object
  System.Web.UI.WebControls.RoleGroup

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 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

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

.NET Framework

Supported in: 2.0
Show: