SPWebPartManager.DisconnectWebPart Method
Removes a Web Part or server control that is being closed or deleted from any connections it is participating in.
Namespace: Microsoft.SharePoint.WebPartPages
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Available in SharePoint Online
Syntax
'Declaration
Protected Overrides Sub DisconnectWebPart ( _
webPart As WebPart _
)
'Usage
Dim webPart As WebPart
Me.DisconnectWebPart(webPart)
protected override void DisconnectWebPart(
WebPart webPart
)
Parameters
webPart
Type: System.Web.UI.WebControls.WebParts.WebPartA Web Part control that is to be disconnected.
Remarks
This override disconnects all provider or consumer connections that are associated with this webPart.