Udostępnij za pośrednictwem


BehaviorEditorPart Web Server Control Overview

The BehaviorEditorPart control provides an editor control that enables end users to change properties that affect the behavior of an associated WebPart or GenericWebPart control.

This topic contains:

  • Background

  • Code Examples

  • Class Reference

Background

The BehaviorEditorPart Web server control is an editor part control that enables end users to change several user interface (UI) properties on an associated WebPart control at run time. The following table lists user customizable features and the corresponding WebPart control property values that users can edit by using the BehaviorEditorPart control.

User Customizable Feature

WebPart Control Property

Set the description text of the Web Part.

Set the Title link.

Set the Title icon image link.

Set the Catalog icon image link.

Set the Help link.

Hide or show the control.

Hidden

Specify the Help mode.

Select the export mode.

Set the authorization filter.

Specify whether a Web part can be removed from the page.

Specify whether a Web part's properties can be edited.

Specify whether a Web part can be hidden.

Specify whether a Web part can be minimized.

Specify whether a Web part can be moved between zones, or only within its own zone.

Enabling a BehaviorEditorPart Web Server Control

The BehaviorEditorPart control is displayed at run time when a Web Parts page is in edit mode, and when the user has selected an associated WebPart control for editing. The BehaviorEditorPart control resides in an EditorZone control.

Note

An EditorZone zone can contain only EditorPart controls. EditorPart controls cannot be put in any other type of zone.

The BehaviorEditorPart control is not displayed on the page when the following conditions are true:

  • The IsShared property of the WebPart control being edited is set to true.

  • The page is in user personalization scope (which is the default).

For the BehaviorEditorPart control to be displayed, you must do the following:

  • Add an entry to the Web.config file that gives an authorized user permission to change Web pages in shared personalization scope. This means that the user's changes are visible to all other users. For more information, see How to: Enable Shared Personalization of Web Parts Pages.

  • Programmatically change the page from user-level to shared-level personalization scope at run time. For example, you can change scope by calling the ToggleScope method.

For an example of how to make the BehaviorEditorPart control visible in a page, see the BehaviorEditorPart. For more information about shared controls and personalization scope, see Web Parts Personalization Overview.

Back to top

Code Examples

Walkthrough: Creating a Web Parts Page

How to: Treat a User Control as a Web Parts Control

How to: Provide Optional Web Parts Controls

How to: Enable Users to Import Web Parts Control Settings

How to: Export Web Parts Control Settings

How to: Build and Run the Data-bound Web Parts Control Example

Walkthrough: Changing Display Modes on a Web Parts Page

How to: Set the Display Mode of a Web Parts Page

Walkthrough: Implementing Web Parts Personalization with a User Control

Walkthrough: Implementing Web Parts Personalization using IPersonalizable

How to: Enable Shared Personalization of Web Parts Pages

How to: Disable Web Parts Personalization

How to: Create Personalizable Properties on a Web Parts Control

How to: Remove User Entries from the Personalization Store

How to: Enable Users to Clear Personalization State

How to: Declare a Static Connection between Two Web Parts Controls

Back to top

Class Reference

Back to top

See Also

Reference

AppearanceEditorPart

System.Web.UI.WebControls.WebParts

BehaviorEditorPart

LayoutEditorPart

PropertyGridEditorPart