UserControl.Attributes プロパティ
アセンブリ: System.Web (system.web.dll 内)

Public ReadOnly Property Attributes As AttributeCollection
public AttributeCollection Attributes { get; }
ユーザー コントロール タグで宣言されたすべての名前と値ペアを格納する AttributeCollection オブジェクト。

ユーザー コントロールの Attributes プロパティを使用して、カスタム コントロール タグで宣言された Message 属性にアクセスするコード例を次に示します。ページ上のユーザー コントロールは、このカスタム コントロール タグによってインスタンス化されています。
' Retrieve and display the 'Message' attribute tag ' initialized in the .aspx code. Response.Write("<b>Message tag value declared in the aspx file is : </b>" + myControl.Attributes("Message"))
// Retrieve and display the 'Message' attribute tag // initialized in the .aspx code. Response.Write("<b>Message tag value declared in the aspx file is : </b>" + myControl.Attributes["Message"]);
void Page_Load(Object sender, System.EventArgs e) { get_Response().Write( "<h2><b> User Control Properties Example</b></h2><br>"); // Retrieve and display the 'Message' attribute tag // initialized in the .aspx code. get_Response().Write( "<b>Message tag value declared in the aspx file is : </b>" + myControl.get_Attributes().get_Item("Message"));

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からUserControl.Attributes プロパティを検索する場合は、下記のリンクをクリックしてください。

- UserControl.Attributes プロパティのページへのリンク