WebPartConnectionsEventArgsとは? わかりやすく解説

WebPartConnectionsEventArgs クラス

メモ : このクラスは、.NET Framework version 2.0 で新しく追加されたものです。

WebPartManager コントロールの WebPartsConnected イベントおよび WebPartsDisconnected イベントのイベント データを提供します。

名前空間: System.Web.UI.WebControls.WebParts
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public Class WebPartConnectionsEventArgs
    Inherits EventArgs
Dim instance As WebPartConnectionsEventArgs
public class WebPartConnectionsEventArgs :
 EventArgs
public ref class WebPartConnectionsEventArgs
 : public EventArgs
public class WebPartConnectionsEventArgs extends
 EventArgs
public class WebPartConnectionsEventArgs extends
 EventArgs
解説解説

Web パーツ コントロール セットの機能を使用して、2 つの WebPart または他のサーバー コントロールの間の接続を作成し、1 つのコントロールはプロバイダとして機能させ、もう 1 つのコントロールをデータのコンシューマとして機能させることができます。接続を形成するには、2 つのコントロールが WebPartZoneBase クラスから継承するゾーンに配置され (WebPartZone コントロールなど)、共通のインターフェイスを通じてデータを共有できるように正しく設計されている必要があります。Web パーツ接続の詳細については、「WebPartConnection」および「Web パーツ接続の概要」を参照してください。

WebPartConnectionsEventArgs クラスは、イベントを処理する WebPartConnectionsEventHandler デリゲートを使用するメソッドにイベント データを渡します。イベントを発生させ、WebPartConnectionsEventArgs クラスを使用してイベント データを提供するこのような接続関連のメソッドは 2 つあります。これらはいずれも、WebPartManager コントロールのメンバです。OnWebPartsConnected メソッドは 2 つのサーバー コントロールが正常に接続された後で WebPartsConnected イベントを発生させ、OnWebPartsDisconnected メソッドは 2 つのサーバー コントロールの接続が切断された後で WebPartsDisconnected イベントを発生させます。

開発者は、WebPartsConnected イベントと WebPartsDisconnected イベントのカスタム イベント ハンドラを作成でき、それらのメソッド内で、接続の詳細にアクセスするための WebPartConnectionsEventArgs クラスを使用できます。たとえば、<asp:webpartmanager> 要素で OnWebPartsConnected 属性を宣言し、イベントを処理するカスタム メソッド名にそれを割り当てることができます。カスタム ハンドラ メソッドでは、パラメータとしてメソッドに渡される WebPartConnectionsEventArgs オブジェクトを使用して、接続の詳細にアクセスできます。

WebPartConnectionsEventArgs クラスには、コンストラクタの 2 つのオーバーロードがあります。System.Web.UI.WebControls.WebParts.WebPartConnectionsEventArgs(WebPart,ProviderConnectionPoint,WebPart,ConsumerConnectionPoint) コンストラクタは既定で、クラスのプロパティ値を初期化します。System.Web.UI.WebControls.WebParts.WebPartConnectionsEventArgs(WebPart,ProviderConnectionPoint,WebPart,ConsumerConnectionPoint,WebPartConnection) コンストラクタは既定のコンストラクタを呼び出し、Connection プロパティの初期化も行います。

WebPartConnectionsEventArgs クラスにはいくつかのプロパティがあり、それらはすべて、Web パーツ接続に不可欠な要素を参照します。Connection プロパティは、接続全体を表す、関連付けられた WebPartConnection オブジェクトを参照します。Provider プロパティは接続でプロバイダとして機能する WebPart またはその他のコントロールを参照し、Consumer プロパティはコンシューマとして機能する WebPart またはサーバー コントロールを参照します。ProviderConnectionPoint プロパティは接続の ProviderConnectionPoint オブジェクトを参照し、ConsumerConnectionPoint プロパティは ConsumerConnectionPoint オブジェクトを参照します。

.NET Framework のセキュリティ.NET Framework のセキュリティ
継承階層継承階層
System.Object
   System.EventArgs
    System.Web.UI.WebControls.WebParts.WebPartConnectionsEventArgs
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
WebPartConnectionsEventArgs メンバ
System.Web.UI.WebControls.WebParts 名前空間
WebPartConnectionsEventHandler
WebPartsConnected
WebPartsDisconnected
OnWebPartsConnected
OnWebPartsDisconnected
その他の技術情報
ASP.NET Web パーツ ページ
Web パーツ接続の概要

WebPartConnectionsEventArgs コンストラクタ (WebPart, ProviderConnectionPoint, WebPart, ConsumerConnectionPoint)

メモ : このコンストラクタは、.NET Framework version 2.0 で新しく追加されたものです。

WebPartConnection オブジェクトを必要とせずに、WebPartConnectionsEventArgs クラスの新しいインスタンスを初期化します。

名前空間: System.Web.UI.WebControls.WebParts
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public Sub New ( _
    provider As WebPart, _
    providerConnectionPoint As ProviderConnectionPoint, _
    consumer As WebPart, _
    consumerConnectionPoint As ConsumerConnectionPoint _
)
Dim provider As WebPart
Dim providerConnectionPoint As ProviderConnectionPoint
Dim consumer As WebPart
Dim consumerConnectionPoint As ConsumerConnectionPoint

Dim instance As New WebPartConnectionsEventArgs(provider,
 providerConnectionPoint, consumer, consumerConnectionPoint)
public WebPartConnectionsEventArgs (
    WebPart provider,
    ProviderConnectionPoint providerConnectionPoint,
    WebPart consumer,
    ConsumerConnectionPoint consumerConnectionPoint
)
public:
WebPartConnectionsEventArgs (
    WebPart^ provider, 
    ProviderConnectionPoint^ providerConnectionPoint, 
    WebPart^ consumer, 
    ConsumerConnectionPoint^ consumerConnectionPoint
)
public WebPartConnectionsEventArgs (
    WebPart provider, 
    ProviderConnectionPoint providerConnectionPoint, 
    WebPart consumer, 
    ConsumerConnectionPoint consumerConnectionPoint
)
public function WebPartConnectionsEventArgs
 (
    provider : WebPart, 
    providerConnectionPoint : ProviderConnectionPoint, 
    consumer : WebPart, 
    consumerConnectionPoint : ConsumerConnectionPoint
)

パラメータ

provider

プロバイダとして機能するコントロール。

providerConnectionPoint

プロバイダ コネクション ポイント。

consumer

コンシューマとして機能するコントロール。

consumerConnectionPoint

コンシューマ接続ポイント。

解説解説
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
WebPartConnectionsEventArgs クラス
WebPartConnectionsEventArgs メンバ
System.Web.UI.WebControls.WebParts 名前空間

WebPartConnectionsEventArgs コンストラクタ (WebPart, ProviderConnectionPoint, WebPart, ConsumerConnectionPoint, WebPartConnection)

メモ : このコンストラクタは、.NET Framework version 2.0 で新しく追加されたものです。

WebPartConnection オブジェクトを指定して、クラスの新しいインスタンスを初期化します。

名前空間: System.Web.UI.WebControls.WebParts
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public Sub New ( _
    provider As WebPart, _
    providerConnectionPoint As ProviderConnectionPoint, _
    consumer As WebPart, _
    consumerConnectionPoint As ConsumerConnectionPoint, _
    connection As WebPartConnection _
)
Dim provider As WebPart
Dim providerConnectionPoint As ProviderConnectionPoint
Dim consumer As WebPart
Dim consumerConnectionPoint As ConsumerConnectionPoint
Dim connection As WebPartConnection

Dim instance As New WebPartConnectionsEventArgs(provider,
 providerConnectionPoint, consumer, consumerConnectionPoint, connection)
public WebPartConnectionsEventArgs (
    WebPart provider,
    ProviderConnectionPoint providerConnectionPoint,
    WebPart consumer,
    ConsumerConnectionPoint consumerConnectionPoint,
    WebPartConnection connection
)
public:
WebPartConnectionsEventArgs (
    WebPart^ provider, 
    ProviderConnectionPoint^ providerConnectionPoint, 
    WebPart^ consumer, 
    ConsumerConnectionPoint^ consumerConnectionPoint, 
    WebPartConnection^ connection
)
public WebPartConnectionsEventArgs (
    WebPart provider, 
    ProviderConnectionPoint providerConnectionPoint, 
    WebPart consumer, 
    ConsumerConnectionPoint consumerConnectionPoint, 
    WebPartConnection connection
)
public function WebPartConnectionsEventArgs
 (
    provider : WebPart, 
    providerConnectionPoint : ProviderConnectionPoint, 
    consumer : WebPart, 
    consumerConnectionPoint : ConsumerConnectionPoint, 
    connection : WebPartConnection
)

パラメータ

provider

プロバイダとして機能する WebPart またはサーバー コントロール。

providerConnectionPoint

接続の ProviderConnectionPoint。

consumer

コンシューマとして機能する WebPart またはサーバー コントロール。

consumerConnectionPoint

接続の ConsumerConnectionPoint。

connection

WebPartConnection オブジェクト。

解説解説

WebPartConnectionsEventArgs コンストラクタのこのバージョンは、WebPartConnection オブジェクトを使用できる場合に使用されます。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
WebPartConnectionsEventArgs クラス
WebPartConnectionsEventArgs メンバ
System.Web.UI.WebControls.WebParts 名前空間

WebPartConnectionsEventArgs コンストラクタ

WebPartConnectionsEventArgs クラスの新しいインスタンスを初期化します。
オーバーロードの一覧オーバーロードの一覧

名前 説明
WebPartConnectionsEventArgs (WebPart, ProviderConnectionPoint, WebPart, ConsumerConnectionPoint) WebPartConnection オブジェクトを必要とせずに、WebPartConnectionsEventArgs クラスの新しいインスタンスを初期化します。
WebPartConnectionsEventArgs (WebPart, ProviderConnectionPoint, WebPart, ConsumerConnectionPoint, WebPartConnection) WebPartConnection オブジェクトを指定して、クラスの新しいインスタンスを初期化します。
参照参照

関連項目

WebPartConnectionsEventArgs クラス
WebPartConnectionsEventArgs メンバ
System.Web.UI.WebControls.WebParts 名前空間

WebPartConnectionsEventArgs プロパティ


パブリック プロパティパブリック プロパティ

参照参照

関連項目

WebPartConnectionsEventArgs クラス
System.Web.UI.WebControls.WebParts 名前空間
WebPartConnectionsEventHandler
WebPartsConnected
WebPartsDisconnected
OnWebPartsConnected
OnWebPartsDisconnected

その他の技術情報

ASP.NET Web パーツ ページ
Web パーツ接続の概要

WebPartConnectionsEventArgs メソッド


パブリック メソッドパブリック メソッド

プロテクト メソッドプロテクト メソッド
参照参照

関連項目

WebPartConnectionsEventArgs クラス
System.Web.UI.WebControls.WebParts 名前空間
WebPartConnectionsEventHandler
WebPartsConnected
WebPartsDisconnected
OnWebPartsConnected
OnWebPartsDisconnected

その他の技術情報

ASP.NET Web パーツ ページ
Web パーツ接続の概要

WebPartConnectionsEventArgs メンバ

WebPartManager コントロールの WebPartsConnected イベントおよび WebPartsDisconnected イベントのイベント データを提供します。

WebPartConnectionsEventArgs データ型で公開されるメンバを以下の表に示します。


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド WebPartConnectionsEventArgs オーバーロードされます。 WebPartConnectionsEventArgs クラスの新しいインスタンスを初期化します。
パブリック プロパティパブリック プロパティ
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

WebPartConnectionsEventArgs クラス
System.Web.UI.WebControls.WebParts 名前空間
WebPartConnectionsEventHandler
WebPartsConnected
WebPartsDisconnected
OnWebPartsConnected
OnWebPartsDisconnected

その他の技術情報

ASP.NET Web パーツ ページ
Web パーツ接続の概要



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

「WebPartConnectionsEventArgs」の関連用語

WebPartConnectionsEventArgsのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



WebPartConnectionsEventArgsのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS