RoleGroupCollection.Add(RoleGroup) Method

Definition

Adds a role group to the end of the collection.

public void Add (System.Web.UI.WebControls.RoleGroup group);

Parameters

group
RoleGroup

The RoleGroup to add to the collection.

Examples

The following code example adds a dynamically created RoleGroup object to the RoleGroupCollection. This code example is part of a larger example provided for the RoleGroup class.

RoleGroup rg = new RoleGroup();
rg.ContentTemplate = new CustomTemplate();
String[] RoleList = {"users"};
rg.Roles = RoleList;
RoleGroupCollection rgc = LoginView1.RoleGroups;
rgc.Add(rg);

Applies to

Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also