SPLimitedWebPartManager.SPConnectWebParts method (WebPart, ProviderConnectionPoint, WebPart, ConsumerConnectionPoint, WebPartTransformer)
Conecta dois pontos de conexão de Web Parts usando um transformador da conexão.
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, _
transformer As WebPartTransformer _
) As SPWebPartConnection
'Uso
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
)
Parâmetros
provider
Type: System.Web.UI.WebControls.WebParts.WebPartA Web Part provedora.
providerConnectionPoint
Type: System.Web.UI.WebControls.WebParts.ProviderConnectionPointO ponto de conexão do provedor.
consumer
Type: System.Web.UI.WebControls.WebParts.WebPartWeb Part do consumidor.
consumerConnectionPoint
Type: System.Web.UI.WebControls.WebParts.ConsumerConnectionPointO ponto de conexão do consumidor.
transformer
Type: System.Web.UI.WebControls.WebParts.WebPartTransformerO transformador de Web Part entre os pontos de conexão.
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. |