WebPartManager.SelectedWebPartChanged Event

Definition

Occurs after the selection of one WebPart control has changed and moved to another control on a Web page.

C#
public event System.Web.UI.WebControls.WebParts.WebPartEventHandler SelectedWebPartChanged;

Event Type

Remarks

This event can be used in conjunction with the OnSelectedWebPartChanged method to change the user interface (UI) of a selected control. For example, if the user switches the page to design mode (DesignDisplayMode), and then selects a WebPart control with the intent of dragging it to a new position, it is common to change the rendering of the selected control, for example by changing the color of its border or background while it is selected.

Note

For more information on consuming events, see How to: Consume Events in a Web Forms Application.

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