This documentation is archived and is not being maintained.
HtmlTextWriter.SelfClosingChars Field
.NET Framework 1.1
Represents the self-closing slash (/) character of an HTML tag.
[Visual Basic] Public Const SelfClosingChars As String [C#] public const string SelfClosingChars; [C++] public: const String* SelfClosingChars; [JScript] public var SelfClosingChars : String;
Remarks
This charcter is used in HTML elements that are self-closed. For example, <asp:linkbutton runat="server" />.
Example
[Visual Basic] ' Write a closing slash for the HTML element. ' Always use this in tandem with a Write method ' call that uses the HtmlTextWriter.TagRightChar ' field as shown here. writer.Write(HtmlTextWriter.SelfClosingChars) writer.Write(HtmlTextWriter.TagRightChar) [C#] // Write a closing slash for the HTML element. // Always use this in tandem with a Write method // call that uses the HtmlTextWriter.TagRightChar // field as shown here. writer.Write(HtmlTextWriter.SelfClosingChars); writer.Write(HtmlTextWriter.TagRightChar);
[C++, JScript] No example is available for C++ or JScript. To view a Visual Basic or C# example, click the Language Filter button
in the upper-left corner of the page.
Requirements
Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family
See Also
HtmlTextWriter Class | HtmlTextWriter Members | System.Web.UI Namespace
Show: