共用方式為


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

連接使用連接變壓器的兩個 [網頁組件連接點。

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

Syntax

'宣告
Public Function SPConnectWebParts ( _
    provider As WebPart, _
    providerConnectionPoint As ProviderConnectionPoint, _
    consumer As WebPart, _
    consumerConnectionPoint As ConsumerConnectionPoint, _
    transformer As WebPartTransformer _
) As SPWebPartConnection
'用途
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
)

參數

傳回值

Type: Microsoft.SharePoint.WebPartPages.SPWebPartConnection
連接的連接點的的SPWebPartConnection物件。

Exceptions

Exception Condition
WebPartPageUserException

提供者或消費者 Web 組件不在網頁上。

請參閱

參照

SPLimitedWebPartManager class

SPLimitedWebPartManager members

SPConnectWebParts overload

Microsoft.SharePoint.WebPartPages namespace