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

Control.OnInit メソッド

Init イベント発生させます

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

Protected Friend Overridable
 Sub OnInit ( _
    e As EventArgs _
)
Dim e As EventArgs

Me.OnInit(e)
protected internal virtual void OnInit (
    EventArgs e
)
protected public:
virtual void OnInit (
    EventArgs^ e
)
protected void OnInit (
    EventArgs e
)
protected internal function
 OnInit (
    e : EventArgs
)

パラメータ

e

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

解説解説
使用例使用例
' Override the OnInit method to write text to the 
' containing page if the _text property is null.
      <System.Security.Permissions.PermissionSetAttribute( _
    System.Security.Permissions.SecurityAction.Demand, Name:="FullTrust")>
 _       
Protected Overrides Sub
 OnInit(e As EventArgs)
   MyBase.OnInit(e)
   If _text Is Nothing Then
      _text = "Here is some default text."
   End If
End Sub 'OnInit
// Override the OnInit method to write text to the 
// containing page if the _text property is null.
[System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.Demand,
 Name="FullTrust")] 
protected override void OnInit(EventArgs e)
{
   base.OnInit(e);
   if ( _text == null)
        _text = "Here is some default text.";
}
// Override the OnInit method to write text to the 
// containing page if the _text property is null.
protected void OnInit(EventArgs e)
{
    super.OnInit(e);
    if (get_Text() == null) {
        set_Text("Here is some default text.");
    }
} //OnInit
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



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

辞書ショートカット

すべての辞書の索引

「Control.OnInit メソッド」の関連用語

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

   

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



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

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

©2025 GRAS Group, Inc.RSS