Export (0) Print
Expand All
Expand Minimize

WebPartManager.BeginWebPartEditing Method

Note: This method is new in the .NET Framework version 2.0.

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
)
public void BeginWebPartEditing (
	WebPart webPart
)
public function BeginWebPartEditing (
	webPart : WebPart
)

Parameters

webPart

The control to be edited.

Exception typeCondition

ArgumentNullException

webPart is a null reference (Nothing in Visual Basic).

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.

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

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

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show:
© 2014 Microsoft