HtmlTextWriter.SelfClosingTagEnd 字段
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
表示自结束标记元素的右斜杠标记和右尖括号(/>)。
public: System::String ^ SelfClosingTagEnd;
public const string SelfClosingTagEnd;
val mutable SelfClosingTagEnd : string
Public Const SelfClosingTagEnd As String
字段值
示例
下面的代码示例演示如何呈现自定义 FileName 属性的值,后跟引号和字段所表示的 SelfClosingTagEnd 字符。 代码示例调用该方法 Write ,并将字段作为参数参数传递 SelfClosingTagEnd 以关闭元素。
此代码示例呈现属性值,然后呈现 FileName 以下标记:
" />
// 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)
注解
构造 SelfClosingTagEnd 自结束标记元素时,该方法使用该 RenderBeginTag 字段。