HtmlTextWriter.SelfClosingTagEnd Campo

Definição

Representa a marca de barra de fechamento e o colchete angular direito (/>) de um elemento de marcação de autofechamento.Represents the closing slash mark and right angle bracket (/>) of a self-closing markup element.

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

Valor do campo

String

Exemplos

O exemplo de código a seguir mostra como renderizar o valor de uma FileName propriedade personalizada seguida por uma aspa e os caracteres representados pelo SelfClosingTagEnd campo.The following code example shows how to render the value of a custom FileName property followed by a quotation mark and the characters represented by the SelfClosingTagEnd field. O exemplo de código chama o Write método e passa o SelfClosingTagEnd campo como o argumento de parâmetro para fechar o elemento.The code example calls the Write method and passes the SelfClosingTagEnd field as the parameter argument to close the element.

Este exemplo de código renderiza o FileName valor da propriedade e, em seguida, a seguinte marcação:This code example renders the FileName property value, and then the following markup:

" />

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

Comentários

O SelfClosingTagEnd campo é usado pelo RenderBeginTag método ao construir elementos de marcação de fechamento automático.The SelfClosingTagEnd field is used by the RenderBeginTag method when constructing self-closing markup elements.

Aplica-se a

Confira também