HtmlTextWriter.SelfClosingTagEnd Campo
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Representa a barra de encerramento e o colchete de ângulo reto (/>) de um elemento de marcação auto-fechante.
public: System::String ^ SelfClosingTagEnd;
public const string SelfClosingTagEnd;
val mutable SelfClosingTagEnd : string
Public Const SelfClosingTagEnd As String
Valor de Campo
Exemplos
O seguinte exemplo de código mostra como renderizar o valor de uma propriedade personalizada FileName seguido de uma aspas e dos caracteres representados pelo SelfClosingTagEnd campo. O exemplo do código chama o Write método e passa o SelfClosingTagEnd campo como argumento do parâmetro para fechar o elemento.
Este exemplo de código apresenta o valor da FileName propriedade, e depois a seguinte marcação:
" />
// 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)
Observações
O SelfClosingTagEnd campo é utilizado pelo RenderBeginTag método ao construir elementos de marcação auto-fechantes.