AttributeCollection.Item プロパティ

名前 | 説明 |
---|---|
AttributeCollection.Item (Int32) | 指定したインデックス番号の属性を取得します。 .NET Compact Framework によってサポートされています。 |
AttributeCollection.Item (Type) | 指定した型の属性を取得します。 .NET Compact Framework によってサポートされています。 |

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

Dim instance As AttributeCollection Dim key As String Dim value As String value = instance(key) instance(key) = value
public: property String^ default [String^] { String^ get (String^ key); void set (String^ key, String^ value); }
/** @property */ public String get_Item (String key) /** @property */ public void set_Item (String key, String value)
プロパティ値
属性値。


ダイナミック HTML onblur 属性を設定し、TextBox Web サーバー コントロールがフォーカスを失ったときに ECMAScript コマンドを実行する例を次に示します。
<html> <head> <script language="VB" runat="server"> Sub Page_Load(sender As Object, e As EventArgs) TextBox1.Attributes("onblur")="javascript:alert('Hello! Focus lost from text box!!');" End Sub </script> </head> <body> <h3>Attributes Property of a Web Control</h3> <form runat="server"> <asp:TextBox id="TextBox1" columns=54 Text="Click here and then tab out of this text box" runat="server"/> </form> </body> </html>
<html> <head> <script language="C#" runat="server"> void Page_Load(Object sender, EventArgs e) { TextBox1.Attributes["onblur"]="javascript:alert('Hello! Focus lost from text box!!');"; } </script> </head> <body> <h3>Attributes Property of a Web Control</h3> <form runat="server"> <asp:TextBox id="TextBox1" columns=54 Text="Click here and then tab out of this text box" runat="server"/> </form> </body> </html>

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- AttributeCollection.Itemのページへのリンク