HtmlTextWriter.SelfClosingTagEnd Pole

Definicja

Reprezentuje zamykający znak ukośnika i prawy nawias kątowy (/>) elementu znaczników samo zamykającego.

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

Wartość pola

Przykłady

Poniższy przykład kodu pokazuje, jak renderować wartość właściwości niestandardowej FileName , po której następuje cudzysłów i znaki reprezentowane przez SelfClosingTagEnd pole. Przykładowy kod wywołuje metodę Write i przekazuje SelfClosingTagEnd pole jako argument parametru, aby zamknąć element.

Ten przykład kodu renderuje FileName wartość właściwości, a następnie następujące znaczniki:

" />

// 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)

Uwagi

Pole SelfClosingTagEnd jest używane przez metodę RenderBeginTag podczas konstruowania elementów znaczników samo zamykających.

Dotyczy

Zobacz też