Метод SPLimitedWebPartManager.SPConnectWebParts (WebPart, ProviderConnectionPoint, WebPart, ConsumerConnectionPoint)
Соединяет две совместимые точки подключения веб-части.
Пространство имен: Microsoft.SharePoint.WebPartPages
Сборка: Microsoft.SharePoint (в Microsoft.SharePoint.dll)
Синтаксис
'Декларация
Public Function SPConnectWebParts ( _
provider As WebPart, _
providerConnectionPoint As ProviderConnectionPoint, _
consumer As WebPart, _
consumerConnectionPoint As ConsumerConnectionPoint _
) As SPWebPartConnection
'Применение
Dim instance As SPLimitedWebPartManager
Dim provider As WebPart
Dim providerConnectionPoint As ProviderConnectionPoint
Dim consumer As WebPart
Dim consumerConnectionPoint As ConsumerConnectionPoint
Dim returnValue As SPWebPartConnection
returnValue = instance.SPConnectWebParts(provider, _
providerConnectionPoint, consumer, _
consumerConnectionPoint)
public SPWebPartConnection SPConnectWebParts(
WebPart provider,
ProviderConnectionPoint providerConnectionPoint,
WebPart consumer,
ConsumerConnectionPoint consumerConnectionPoint
)
Параметры
provider
Тип: System.Web.UI.WebControls.WebParts.WebPartЭлемент управления веб-части поставщика.
providerConnectionPoint
Тип: System.Web.UI.WebControls.WebParts.ProviderConnectionPointТочка подключения поставщика.
consumer
Тип: System.Web.UI.WebControls.WebParts.WebPartПотребитель Web Part.control.
consumerConnectionPoint
Тип: System.Web.UI.WebControls.WebParts.ConsumerConnectionPointТочки подключения потребителя.
Возвращаемое значение
Тип: Microsoft.SharePoint.WebPartPages.SPWebPartConnection
Объект SPWebPartConnection для точек подключения подключения.
Исключения
Исключение | Условие |
---|---|
WebPartPageUserException | Поставщика или потребителя веб-части отсутствует на странице. |