SPWebPartManager.CopyWebPart Method

Returns the WebPart passed in without creating a copy.

Namespace:  Microsoft.SharePoint.WebPartPages
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online


Protected Overrides Function CopyWebPart ( _
    webPart As WebPart _
) As WebPart
Dim webPart As WebPart
Dim returnValue As WebPart

returnValue = Me.CopyWebPart(webPart)
protected override WebPart CopyWebPart(
    WebPart webPart


Return Value

Type: System.Web.UI.WebControls.WebParts.WebPart
A Web Part to be added to a page.


This override returns the webPart passed into the procedure without creating a copy.

See Also


SPWebPartManager Class

SPWebPartManager Members

Microsoft.SharePoint.WebPartPages Namespace