ControlCollection.Owner プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ControlCollection.Owner プロパティの意味・解説 

ControlCollection.Owner プロパティ

ControlCollection オブジェクト属すASP.NET サーバー コントロール取得します

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

使用例使用例

次に示すのは、ControlCollection クラスの ControlCollection メソッドオーバーライドするカスタム クラスコード例です。このカスタム クラスでは、コレクションインスタンス作成されるトレース ログメッセージ (Owner プロパティの名前を含む) が書き込まれます。この例を使用するには、ページまたはアプリケーショントレース機能有効になっている必要があります

' Create a custom ControlCollection that writes
' information to the Trace log when an instance
' of the collection is created.
<AspNetHostingPermission(SecurityAction.Demand, _
   Level:=AspNetHostingPermissionLevel.Minimal)> _
Public NotInheritable Class
 CustomControlCollection
    Inherits ControlCollection

    Private context As HttpContext

    Public Sub New(ByVal
 owner As Control)
        MyBase.New(owner)
        HttpContext.Current.Trace.Write("The control collection
 is created.")
        ' Display the Name of the control
        ' that uses this collection when tracing is enabled.
        HttpContext.Current.Trace.Write("The owner is: "
 _
      & Me.Owner.ToString())
    End Sub


End Class

// Create a custom ControlCollection that writes
// information to the Trace log when an instance
// of the collection is created.
[AspNetHostingPermission(SecurityAction.Demand, Level=AspNetHostingPermissionLevel.Minimal)]
public class CustomControlCollection : ControlCollection
{
    private HttpContext context;

    public CustomControlCollection(Control owner)
        : base(owner)
    {

        HttpContext.Current.Trace.Write("The control collection is created.");
        // Display the Name of the control
        // that uses this collection when tracing is enabled.
        HttpContext.Current.Trace.Write("The owner is: " + this.Owner.ToString());
    }
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ControlCollection クラス
ControlCollection メンバ
System.Web.UI 名前空間
Control.Controls プロパティ



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

辞書ショートカット

すべての辞書の索引

「ControlCollection.Owner プロパティ」の関連用語

ControlCollection.Owner プロパティのお隣キーワード
検索ランキング

   

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



ControlCollection.Owner プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS