SPLimitedWebPartManager.SPConnectWebParts Method (WebPart, ProviderConnectionPoint, WebPart, ConsumerConnectionPoint, WebPartTransformer)

Connects two Web Part connection points using a connection transformer.

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

Syntax

'Declaration
Public Function SPConnectWebParts ( _
    provider As WebPart, _
    providerConnectionPoint As ProviderConnectionPoint, _
    consumer As WebPart, _
    consumerConnectionPoint As ConsumerConnectionPoint, _
    transformer As WebPartTransformer _
) As SPWebPartConnection
'Usage
Dim instance As SPLimitedWebPartManager
Dim provider As WebPart
Dim providerConnectionPoint As ProviderConnectionPoint
Dim consumer As WebPart
Dim consumerConnectionPoint As ConsumerConnectionPoint
Dim transformer As WebPartTransformer
Dim returnValue As SPWebPartConnection

returnValue = instance.SPConnectWebParts(provider, _
    providerConnectionPoint, consumer, _
    consumerConnectionPoint, transformer)
public SPWebPartConnection SPConnectWebParts(
    WebPart provider,
    ProviderConnectionPoint providerConnectionPoint,
    WebPart consumer,
    ConsumerConnectionPoint consumerConnectionPoint,
    WebPartTransformer transformer
)

Parameters

Return Value

Type: Microsoft.SharePoint.WebPartPages.SPWebPartConnection
The SPWebPartConnection object for the connected connection points.

Exceptions

Exception Condition
WebPartPageUserException

The provider or consumer Web Part is not on the page.

See Also

Reference

SPLimitedWebPartManager Class

SPLimitedWebPartManager Members

SPConnectWebParts Overload

Microsoft.SharePoint.WebPartPages Namespace