แก้ไข

แชร์ผ่าน


HtmlTextWriter.SelfClosingTagEnd Field

Definition

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 

Field Value

Examples

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. The code example calls the Write method and passes the SelfClosingTagEnd field as the parameter argument to close the element.

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)

Remarks

The SelfClosingTagEnd field is used by the RenderBeginTag method when constructing self-closing markup elements.

Applies to

See also