SP.WebParts.WebPartDefinition.deleteWebPart() Method

Applies to: SharePoint Foundation 2010

Deletes the Web Part from the page.

SP.WebParts.WebPartDefinition.deleteWebPart();

Applies To

SP.WebParts.WebPartDefinition Class

Exceptions

  • [Microsoft.SharePoint.WebPartPages.WebPartPageUserException]
    The current user has insufficient permissions. Error code: -1.

Remarks

When Scope is User, the current user must have permissions to add and delete personalized Web Parts. When Scope is Shared, the current user must have permissions to customize pages.

See Also

Reference

SP.WebParts.WebPartDefinition Methods

SP.WebParts.WebPartDefinition Properties

SP.WebParts Namespace