RoleGroup Class
Associates a content template in a LoginView control with one or more roles defined for the Web site. This class cannot be inherited.
Assembly: System.Web (in System.Web.dll)
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.
- AspNetHostingPermission
for operating in a hosted environment. Demand value: LinkDemand; Permission value: Minimal.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.