Language

HtmlTextWriter.RegisterAttribute(String, HtmlTextWriterAttribute) メソッド

定義

要求元のクライアントに適切にレンダリングできるように、ソース ファイルからマークアップ属性を登録します (リテラルまたは動的に生成されるかどうか)。

protected:
 static void RegisterAttribute(System::String ^ name, System::Web::UI::HtmlTextWriterAttribute key);
protected static void RegisterAttribute(string name, System.Web.UI.HtmlTextWriterAttribute key);
static member RegisterAttribute : string * System.Web.UI.HtmlTextWriterAttribute -> unit
Protected Shared Sub RegisterAttribute (name As String, key As HtmlTextWriterAttribute)

パラメーター

name
String

登録するマークアップ属性の名前を含む文字列。

key
HtmlTextWriterAttribute

属性名に対応する HtmlTextWriterAttribute 。

注釈

HTML マークアップ言語の定義済み属性は、最初のRegisterAttribute オブジェクトの作成時に、HtmlTextWriter メソッドの呼び出しによって登録されます。 動的属性は、 RegisterAttribute メソッドを使用して他の時点で登録できます。

RegisterAttribute メソッドで使用される登録テーブルはstaticされるため、属性の登録は、ホスト コンピューター上のすべてのHtmlTextWriter オブジェクトに適用されます。

適用対象

こちらもご覧ください