リテラルの、または動的に生成されたマークアップ属性をソース ファイルから登録して、これらの属性を要求側のクライアントに適切に出力できるようにします。
名前空間: System.Web.UI
アセンブリ: System.Web (system.web.dll 内)
構文
'宣言
Protected Shared Sub RegisterAttribute ( _
name As String, _
key As HtmlTextWriterAttribute _
)
'使用
Dim name As String
Dim key As HtmlTextWriterAttribute
HtmlTextWriter.RegisterAttribute(name, key)
protected static void RegisterAttribute (
string name,
HtmlTextWriterAttribute key
)
protected:
static void RegisterAttribute (
String^ name,
HtmlTextWriterAttribute key
)
protected static void RegisterAttribute (
String name,
HtmlTextWriterAttribute key
)
protected static function RegisterAttribute (
name : String,
key : HtmlTextWriterAttribute
)
適用できません。
パラメータ
- name
登録するマークアップ属性の名前を格納している文字列。
- key
属性名に対応する HtmlTextWriterAttribute。
解説
HTML マークアップ言語の定義済み属性は、最初の HtmlTextWriter オブジェクトの作成時に、RegisterAttribute メソッドを呼び出して登録されます。動的属性は、別の時点で RegisterAttribute メソッドを使用して登録できます。
RegisterAttribute メソッドによって使用される登録テーブルは static であるため、属性の登録はホスト コンピュータ上のすべての HtmlTextWriter オブジェクトに適用されます。
プラットフォーム
Windows 98,Windows Server 2000 SP4,Windows CE,Windows Millennium Edition,Windows Mobile for Pocket PC,Windows Mobile for Smartphone,Windows Server 2003,Windows XP Media Center Edition,Windows XP Professional x64 Edition,Windows XP SP2,Windows XP Starter Edition
Microsoft .NET Framework 3.0 は Windows Vista,Microsoft Windows XP SP2,および Windows Server 2003 SP1 でサポートされています。
バージョン情報
.NET Framework
サポート対象 : 3.0,2.0,1.1,1.0
参照
関連項目
HtmlTextWriter クラス
HtmlTextWriter メンバ
System.Web.UI 名前空間
TextWriter
HtmlTextWriterAttribute