다음을 통해 공유


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

Connects two compatible Web Part connection points.

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 _
) As SPWebPartConnection
'Usage
Dim instance As SPLimitedWebPartManager
Dim provider As WebPart
Dim providerConnectionPoint As ProviderConnectionPoint
Dim consumer As WebPart
Dim consumerConnectionPoint As ConsumerConnectionPoint
Dim returnValue As SPWebPartConnection

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

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