共用方式為


SPWebPartManager.CanSPConnectWebParts method

檢查將參與連接以檢查SPWebPartConnection是否可以用來建立它們之間的連接 Web 組件。

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

Syntax

'宣告
Public Function CanSPConnectWebParts ( _
    provider As WebPart, _
    providerConnectionPoint As ProviderConnectionPoint, _
    consumer As WebPart, _
    consumerConnectionPoint As ConsumerConnectionPoint, _
    transformer As WebPartTransformer _
) As Boolean
'用途
Dim instance As SPWebPartManager
Dim provider As WebPart
Dim providerConnectionPoint As ProviderConnectionPoint
Dim consumer As WebPart
Dim consumerConnectionPoint As ConsumerConnectionPoint
Dim transformer As WebPartTransformer
Dim returnValue As Boolean

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

參數

傳回值

Type: System.Boolean
true如果SPWebPartConnection可以用來形成連接之間 Web 組件中 ;否則, false。

備註

這個方法會傳回false下任何下列條件:

  1. providerConnectionPoint和consumerConnectionPoint是Windows SharePoint Services 2.0連線介面。

  2. provider或consumer網頁組件不在區域中。

  3. consumer或provider網頁組件就會關閉。

  4. providerConnectionPoint或consumerConnectionPoint無法參與連接。

  5. 多個連線嘗試在providerConnectionPoint或consumerConnectionPoint ,而且連線不支援多個連線。

  6. consumerConnectionPoint和providerConnectionPoint介面並不相同的型別,轉換程式可能未提供或轉換程式不支援providerConnectionPoint或consumerConnectionPoint所需的介面型別。

請參閱

參照

SPWebPartManager class

SPWebPartManager members

Microsoft.SharePoint.WebPartPages namespace