HtmlTextWriter.SelfClosingTagEnd Campo

Definición

Representa la barra diagonal de cierre y el corchete angular de cierre (/>) de un elemento de marcado de cierre automático.

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

Valor de campo

Ejemplos

En el ejemplo de código siguiente se muestra cómo representar el valor de una propiedad personalizada FileName seguido de una comilla y los caracteres representados por el SelfClosingTagEnd campo. El ejemplo de código llama al Write método y pasa el SelfClosingTagEnd campo como argumento de parámetro para cerrar el elemento.

En este ejemplo de código se representa el valor de propiedad FileName y, a continuación, el marcado siguiente:

" />

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

Comentarios

El SelfClosingTagEnd método usa el RenderBeginTag campo al construir elementos de marcado de autocierre.

Se aplica a

Consulte también