SPWebPartManager.CopyWebPart method

Returns the WebPart passed in without creating a copy.

Namespace:  Microsoft.SharePoint.WebPartPages
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

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

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

Parameters

Return value

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

Remarks

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

See also

Reference

SPWebPartManager class

SPWebPartManager members

Microsoft.SharePoint.WebPartPages namespace