This documentation is archived and is not being maintained.

WebPartManager::BeginWebPartEditing Method

Starts the process of editing a WebPart control.

Namespace:  System.Web.UI.WebControls.WebParts
Assembly:  System.Web (in System.Web.dll)

public:
virtual void BeginWebPartEditing(
	WebPart^ webPart
)

Parameters

webPart
Type: System.Web.UI.WebControls.WebParts::WebPart
The control to be edited.

ExceptionCondition
ArgumentNullException

webPart is nullptr.

InvalidOperationException

The current display mode on the page is not EditDisplayMode.

ArgumentException

webPart is closed.

- or -

webPart is not part of the Controls collection.

-or -

webPart is equal to the SelectedWebPart control.

The BeginWebPartEditing method exists so that the process of editing controls can be done in distinct stages, giving developers more control over the process. The method performs a set of initial checks to ensure that webPart is in a state where it can be edited. If webPart passes all the checks, it is then set as the currently selected control (see the SelectedWebPart property), and the editing process can continue.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: