HtmlTextWriter.GetTagName メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > HtmlTextWriter.GetTagName メソッドの意味・解説 

HtmlTextWriter.GetTagName メソッド

指定した HtmlTextWriterTag 列挙値に関連付けられたマークアップ要素を取得します。

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

Protected Overridable Function
 GetTagName ( _
    tagKey As HtmlTextWriterTag _
) As String
Dim tagKey As HtmlTextWriterTag
Dim returnValue As String

returnValue = Me.GetTagName(tagKey)
protected virtual string GetTagName (
    HtmlTextWriterTag tagKey
)
protected:
virtual String^ GetTagName (
    HtmlTextWriterTag tagKey
)
protected String GetTagName (
    HtmlTextWriterTag tagKey
)
protected function GetTagName (
    tagKey : HtmlTextWriterTag
) : String

パラメータ

tagKey

マークアップ要素の取得対象の HtmlTextWriterTag。

戻り値
マークアップ要素を表す文字列。

解説解説

tagKey が有効な HtmlTextWriterTag 値ではない場合、GetTagName メソッドは空の文字列 ("") を返します。

使用例使用例

WriteEndTag メソッドを使用して、<font> 要素を閉じる方法を次のコード例に示します。WriteEndTag メソッドは、GetTagName メソッドを呼び出し、Font 値を文字列に変換します。

    ' Close the Font element.
    Me.WriteEndTag(GetTagName(HtmlTextWriterTag.Font))
End If
// Close the Font element.
Write(GetTagName(HtmlTextWriterTag.Font));
// Close the Font element.
WriteEndTag( GetTagName( HtmlTextWriterTag::Font ) );
    // Close the Font element.
    Write(GetTagName(HtmlTextWriterTag.Font));
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
HtmlTextWriter クラス
HtmlTextWriter メンバ
System.Web.UI 名前空間
TextWriter
HtmlTextWriterTag



英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

HtmlTextWriter.GetTagName メソッドのお隣キーワード
検索ランキング

   

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



HtmlTextWriter.GetTagName メソッドのページの著作権

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

©2026 GRAS Group, Inc.RSS