If you have enabled Membership Roles, then you may use the
Edit Membership Roles View to specify the roles for a selected user.
This view is not visible if roles are not enabled. For assistance in enabling roles for your web site and also for securing the Membership Manager Control,
watch this Flash video.
As illustrated, the view displays the current user's name and Email Address and includes check boxes for each of the roles you have defined.
Recall that the Membership Manager Control includes a feature for
creating new membership roles.
To add a member to a role, simply check the appropriate checkBox. To remove the role membership, simply uncheck the box.
The "OK" button submits the changes while the "Cancel" button returns you to the
Summary View without committing your changes.
Customizing the view (design time)
The Heading Text and User Name prompt may be modified by changing the
EditRolesTitle
and
ChangeRoleNamePrompt properties in the Visual Studio 2005 Properties
pane.
While simple label and style changes might be adequate for your needs, you may also
wish to take advantage of the
Convert to Template option which exposes
the view's constituent web controls for formatting and editing.
As illustrated, the Tasks panel includes an option to select the desired view then
Convert to Template changes it to a templated panel.
Just like the Asp.Net Login Controls, templated views allow you to change the layout
and content of the panel. You actually have a lot of flexibility when doing so,
however you must not delete or change the name of the active controls such as the
text box, the OK button or the Cancel Button.
The following is an example of a panel that has been converted to a template then
customized with additional controls:
As you can see, the modified control may contain additional label controls, check boxes
and varied formatting.
Control properties do not apply to templated views
When you convert a view to a templated view, the constituent controls are created
using the current properties which have been set (styles, text, etc.) The next time
you refresh the page, you may notice that properties related to the now-templated
view are no longer listed in the Visual Studio 2005 Properties pane. This
is by design and it is assumed that you will be setting properties on the controls
themselves.
If you want to discard your templated changes, just bring up the tasks menu and
click the
Reset option as illustrated below. Caution: Reset will immediately
discard any changes you have made to your custom view template. Of course, nothing
is permanent until you save the file.