SPWebPartCollection.Delete Method
NOTE: This API is now obsolete.
Obsolete. Deletes the Web Part with the specified GUID from the collection.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
<ObsoleteAttribute("Use SPLimitedWebPartManager instead.")> _
Public Sub Delete ( _
storageKey As Guid _
)
'Usage
Dim instance As SPWebPartCollection
Dim storageKey As Guid
instance.Delete(storageKey)
[ObsoleteAttribute("Use SPLimitedWebPartManager instead.")]
public void Delete(
Guid storageKey
)
Parameters
storageKey
Type: System.GuidA GUID that identifies the Web Part.
Remarks
The Delete method throws an exception if the collection pertains to a single user and the Web Part is type I or type II.