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

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

Parameter.OnParameterChanged メソッド

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

Parameter オブジェクト格納する ParameterCollection コレクションの OnParametersChanged メソッド呼び出します。

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

Protected Sub OnParameterChanged
Me.OnParameterChanged
protected void OnParameterChanged ()
protected:
void OnParameterChanged ()
protected void OnParameterChanged ()
protected function OnParameterChanged ()
解説解説

Parameter オブジェクトParameterCollection コレクション含まれていない場合OnParameterChanged メソッド呼び出し無効になりますParameter オブジェクトParameterCollection コレクション含まれている場合には、OnParameterChangedコレクションの ParameterCollection.ParametersChanged イベント発生させます

ParameterCollection コレクションデータ ソース コントロール格納されている場合ParameterCollection.ParametersChanged イベントは、そのデータ ソース コントロールの System.Web.UI.IDataSource.DataSourceChanged イベント発生させます。これにより、データ バインド コントロールが再バインドます。

イベント発生すると、デリゲート使用してイベント ハンドラ呼び出されます。詳細については、「イベントの発生」を参照してください

OnParameterChanged メソッド使用すると、デリゲート結び付けずに、派生クラスイベント処理することもできます派生クラスイベント処理する場合は、この手法をお勧めます。

継承時の注意 派生クラスOnParameterChangedオーバーライドする場合は、登録されているデリゲートイベント受け取ることができるように、基本クラスOnParameterChanged メソッド呼び出してください

使用例使用例

パラメータの状態が変更されたときに、OnParameterChanged メソッド呼び出して ParametersChanged イベント発生させる方法次のコード例示します。このコード例Parameter クラス概要取り上げているコード例一部分です。

' The Value property is a type safe convenience property
' used when the StaticParameter represents string data.
' It gets the string value of the DataValue property, and
' sets the DataValue property directly.
Public Property Value() As
 String
   Get
      Dim o As Object =
 DataValue
      If o Is Nothing OrElse
 Not TypeOf o Is String
 Then
         Return String.Empty
      End If
      Return CStr(o)
   End Get
   Set
      DataValue = value
      OnParameterChanged()
   End Set
End Property
// The Value property is a type safe convenience property
// used when the StaticParameter represents string data.
// It gets the string value of the DataValue property, and
// sets the DataValue property directly.
public string Value {
  get {
    object o = DataValue;
    if (o == null || !(o is string))
      return String.Empty;
    return (string)o;
  }
  set {
    DataValue = value;
    OnParameterChanged();
  }
}
// The Value property is a type safe convenience property 
// used when the StaticParameter represents string data.
// It gets the string value of the DataValue property, and
// sets the DataValue property directly.
/** @property 
 */
public String get_Value()
{
    Object o = get_DataValue();

    if (o == null || !(o instanceof String))
 {
        return String.Empty;
    }

    return (String)(o);
} //get_Value


/** @property 
 */
public void set_Value(String value)
{
    set_DataValue(value);
    OnParameterChanged();
} //set_Value
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
Parameter クラス
Parameter メンバ
System.Web.UI.WebControls 名前空間
ParametersChanged



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

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

   

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



Parameter.OnParameterChanged メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS