Compartilhar via


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

Conecta dois pontos de conexão de Web Parts compatíveis.

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

Syntax

'Declaração
Public Function SPConnectWebParts ( _
    provider As WebPart, _
    providerConnectionPoint As ProviderConnectionPoint, _
    consumer As WebPart, _
    consumerConnectionPoint As ConsumerConnectionPoint _
) As SPWebPartConnection
'Uso
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
)

Parâmetros

Valor retornado

Type: Microsoft.SharePoint.WebPartPages.SPWebPartConnection
O objeto SPWebPartConnection para os pontos de conexão conectado.

Exceptions

Exception Condition
WebPartPageUserException

O provedor ou a Web Part do consumidor não está na página.

Ver também

Referência

SPLimitedWebPartManager class

SPLimitedWebPartManager members

SPConnectWebParts overload

Microsoft.SharePoint.WebPartPages namespace