次の方法で共有


HtmlTextWriter.SelfClosingTagEnd フィールド

自己終了マークアップ要素の終了スラッシュ記号と右山かっこ (/>) を表します。

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

構文

'宣言
Public Const SelfClosingTagEnd As String
'使用
Dim value As String

value = HtmlTextWriter.SelfClosingTagEnd
public const string SelfClosingTagEnd
public:
literal String^ SelfClosingTagEnd
public static final String SelfClosingTagEnd
public const var SelfClosingTagEnd : String
適用できません。

解説

SelfClosingTagEnd フィールドは、自己終了マークアップ要素を構築するときに、RenderBeginTag メソッドで使用されます。

使用例

カスタム FileName プロパティの値を出力し、続けて SelfClosingTagEnd フィールドによって表された引用符と文字を出力する方法を次のコード例に示します。このコード例では、Write メソッドを呼び出し、SelfClosingTagEnd フィールドをパラメータ引数として渡して、要素を閉じています。

このコード例では、FileName プロパティ値を出力してから、次のマークアップを出力します。

" />

' Write the name of the image file from the 
' FileName property, close the path, and then
' close the <img> element.
writer.Write(FileName)
writer.Write(HtmlTextWriter.DoubleQuoteChar)
writer.Write(HtmlTextWriter.SelfClosingTagEnd)
// Write the name of the image file from the 
// FileName property, close the path, and then
// close the <img> element.
writer.Write(FileName);
writer.Write(HtmlTextWriter.DoubleQuoteChar);
writer.Write(HtmlTextWriter.SelfClosingTagEnd);

プラットフォーム

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
RenderBeginTag