Control.RaiseBubbleEvent メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > Control.RaiseBubbleEvent メソッドの意味・解説 

Control.RaiseBubbleEvent メソッド

イベントのソースおよびその情報をコントロールの親に割り当てます。

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

Protected Sub RaiseBubbleEvent ( _
    source As Object, _
    args As EventArgs _
)
Dim source As Object
Dim args As EventArgs

Me.RaiseBubbleEvent(source, args)
protected void RaiseBubbleEvent (
    Object source,
    EventArgs args
)
protected:
void RaiseBubbleEvent (
    Object^ source, 
    EventArgs^ args
)
protected void RaiseBubbleEvent (
    Object source, 
    EventArgs args
)
protected function RaiseBubbleEvent (
    source : Object, 
    args : EventArgs
)

パラメータ

source

イベントのソース。

args

イベント データを格納している EventArgs オブジェクト。

解説解説
使用例使用例

カスタム クラス ChildControl を作成し、Button.OnClick メソッドをオーバーライドして、その親の ASP.NET サーバー コントロールに Button.Click イベントを送る RaiseBubbleEvent メソッドを呼び出す方法を次のコード例に示します。ChildControl のインスタンスが含まれる ASP.NET ページのボタンをユーザーがクリックすると、その ChildControl のインスタンスが含まれる親コントロールで OnBubbleEvent メソッドが呼び出され、そのページに "The ChildControl class OnClick method is called" という文字列が書き込まれます。

Public Class ChildControl
   Inherits Button
   
   <System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.Demand,
 Name:="FullTrust")> _
   Protected Overrides Sub
 OnClick(e As EventArgs)
      MyBase.OnClick(e)
      Context.Response.Write("<br><br>ChildControl's
 OnClick called.")
      ' Bubble this event to parent.
      RaiseBubbleEvent(Me, e)
   End Sub 'OnClick
End Class 'ChildControl 
public class ChildControl : Button
{
   [System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.Demand,
 Name="FullTrust")] 
   protected override void OnClick(EventArgs
 e) 
   {
      base.OnClick(e);
      Context.Response.Write("<br><br>ChildControl's OnClick called.");
      // Bubble this event to parent.
      RaiseBubbleEvent(this, e);
   }
public class ChildControl extends Button
{
    protected void OnClick(EventArgs e)
    {
        super.OnClick(e);
        get_Context().get_Response().Write("<br><br>ChildControl's
 OnClick"
            + " called.");
        // Bubble this event to parent.
        RaiseBubbleEvent(this, e);
    } //OnClick
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

Control.RaiseBubbleEvent メソッドのお隣キーワード
検索ランキング

   

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



Control.RaiseBubbleEvent メソッドのページの著作権

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

©2026 GRAS Group, Inc.RSS