This documentation is archived and is not being maintained.

LayoutEditorPart.ApplyChanges Method

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

Saves the values from a LayoutEditorPart control to the corresponding properties in the associated WebPart control.

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

public override bool ApplyChanges ()
public boolean ApplyChanges ()
public override function ApplyChanges () : boolean

Return Value

true if the action of saving values from the LayoutEditorPart control to the WebPart control is successful; otherwise (if an error occurs), false.

Exception typeCondition


An error occurred when setting the value of the ChromeState property on the associated WebPart control.

The ApplyChanges method is a critical method on a LayoutEditorPart control. The method's purpose is to save the values a user has set on a LayoutEditorPart control to the corresponding properties in the associated WebPart control. The associated control is referenced in the LayoutEditorPart control's inherited WebPartToEdit property.


You cannot call the ApplyChanges method from your own code. However, if you need more programmatic control over the process of editing various WebPart control properties than the LayoutEditorPart control provides, you can create a custom EditorPart control and provide your own implementation of this method. For an example, see the EditorPart.ApplyChanges method.

The ApplyChanges method attempts to set the following properties on the associated WebPart control:

The ApplyChanges method is called when the user clicks a button representing an OK or an apply verb in the editing user interface (UI).

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