Partager via


SPLimitedWebPartManager.SPConnectWebParts - Méthode (WebPart, ProviderConnectionPoint, WebPart, ConsumerConnectionPoint, WebPartTransformer)

Relie les deux points de connexion de composant WebPart à l'aide d'un transformateur de connexion.

Espace de noms :  Microsoft.SharePoint.WebPartPages
Assembly :  Microsoft.SharePoint (dans Microsoft.SharePoint.dll)

Syntaxe

'Déclaration
Public Function SPConnectWebParts ( _
    provider As WebPart, _
    providerConnectionPoint As ProviderConnectionPoint, _
    consumer As WebPart, _
    consumerConnectionPoint As ConsumerConnectionPoint, _
    transformer As WebPartTransformer _
) As SPWebPartConnection
'Utilisation
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
)

Paramètres

Valeur renvoyée

Type : Microsoft.SharePoint.WebPartPages.SPWebPartConnection
L'objet SPWebPartConnection pour les points de connexion connecté.

Exceptions

Exception Condition
WebPartPageUserException

Le fournisseur ou le composant WebPart consommateur n'est pas sur la page.

Voir aussi

Référence

SPLimitedWebPartManager classe

SPLimitedWebPartManager - Membres

SPConnectWebParts - Surcharge

Microsoft.SharePoint.WebPartPages - Espace de noms