Uredi

Deli z drugimi prek


WebPartManager.SelectedWebPart Property

Definition

Gets a reference to a WebPart or other server control that is currently selected for editing or for creating a connection with another control.

public:
 property System::Web::UI::WebControls::WebParts::WebPart ^ SelectedWebPart { System::Web::UI::WebControls::WebParts::WebPart ^ get(); };
[System.ComponentModel.Browsable(false)]
public System.Web.UI.WebControls.WebParts.WebPart SelectedWebPart { get; }
[<System.ComponentModel.Browsable(false)>]
member this.SelectedWebPart : System.Web.UI.WebControls.WebParts.WebPart
Public ReadOnly Property SelectedWebPart As WebPart

Property Value

A WebPart control that is currently selected for editing or forming a connection.

Attributes

Remarks

The SelectedWebPart property returns a reference to a WebPart or other server control that is currently selected for editing or for creating a connection with another control.

The WebPartManager control provides several useful methods and events for handling the process of selecting a control. The SelectedWebPartChanging event occurs just after a control is selected, but before any changes are made. To carry out some actions on the control after it is selected, override the OnSelectedWebPartChanging method. For example, you might want to change the appearance of a control that is selected but has not changed yet, to emphasize visually which control is selected.

The SelectedWebPartChanged event occurs just after the selected control has been changed. To carry out some actions on the control after it has changed, override the OnSelectedWebPartChanged method.

Applies to

See also