HtmlTextWriter.SelfClosingTagEnd フィールド

定義

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

public: System::String ^ SelfClosingTagEnd;
public const string SelfClosingTagEnd;
val mutable SelfClosingTagEnd : string
Public Const SelfClosingTagEnd As String 

フィールド値

次のコード例は、カスタム 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)

注釈

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

適用対象

こちらもご覧ください