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
)
參數
provider
Type: System.Web.UI.WebControls.WebParts.WebPart提供者 Web 組件。
providerConnectionPoint
Type: System.Web.UI.WebControls.WebParts.ProviderConnectionPoint提供者連接點。
consumer
Type: System.Web.UI.WebControls.WebParts.WebPart消費者 Web 組件中。
consumerConnectionPoint
Type: System.Web.UI.WebControls.WebParts.ConsumerConnectionPoint消費者連接點。
transformer
Type: System.Web.UI.WebControls.WebParts.WebPartTransformer網頁組件轉換程式之間的連接點。
傳回值
Type: Microsoft.SharePoint.WebPartPages.SPWebPartConnection
連接的連接點的的SPWebPartConnection物件。
Exceptions
Exception | Condition |
---|---|
WebPartPageUserException | 提供者或消費者 Web 組件不在網頁上。 |