SPWebPartCollection.Add Method (WebPart)
NOTE: This API is now obsolete.
Obsolete. Adds the specified Web Part to the collection.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
<ObsoleteAttribute("Use SPLimitedWebPartManager instead.")> _
Public Function Add ( _
webPart As WebPart _
) As Guid
'Usage
Dim instance As SPWebPartCollection
Dim webPart As WebPart
Dim returnValue As Guid
returnValue = instance.Add(webPart)
[ObsoleteAttribute("Use SPLimitedWebPartManager instead.")]
public Guid Add(
WebPart webPart
)
Parameters
webPart
Type: Microsoft.SharePoint.WebPartPages.WebPartA Web Part object that represents the new Web Part.
Return Value
Type: System.Guid
A GUID that identifies the Web Part.