HtmlTextWriter.SelfClosingTagEnd フィールド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
自己終了マークアップ要素の終了スラッシュと右山かっこ (/>) を表します。
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 メソッドによって使用されます。