Partilhar via


SPWebPartCollection.Add Method (String)

NOTE: This API is now obsolete.

Obsolete. Adds a Web Part to the collection based on the specified Web Part definition file.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
<ObsoleteAttribute("Use SPLimitedWebPartManager instead.")> _
Public Function Add ( _
    dwp As String _
) As Guid
'Usage
Dim instance As SPWebPartCollection
Dim dwp As String
Dim returnValue As Guid

returnValue = instance.Add(dwp)
[ObsoleteAttribute("Use SPLimitedWebPartManager instead.")]
public Guid Add(
    string dwp
)

Parameters

Return Value

Type: System.Guid
A GUID that identifies the Web Part.

See Also

Reference

SPWebPartCollection Class

SPWebPartCollection Members

Add Overload

Microsoft.SharePoint Namespace