This documentation is archived and is not being maintained.

HtmlTextWriter.SlashChar Field

Represents the slash (/) character.

[Visual Basic]
Public Const SlashChar As Char
[C#]
public const char SlashChar;
[C++]
public: const __wchar_t SlashChar;
[JScript]
public var SlashChar : Char;

Remarks

Use this constant when you write a URL using the HtmlTextWriter class.

Example

[Visual Basic] 
' The endTag variable must be declared as a string 
' in the class variable. Use the TagLeftChar,
' SlashChar, and TagRightChar fields and
' the GetTagName method to assign a value to
' the endTag variable.
endTag = TagLeftChar & SlashChar & GetTagName(HtmlTextWriterTag.Font) & TagRightChar
         
' Use the PushEndTag method to write the custom
' endTag string value as its parameter.
PushEndTag(endTag)
      End If 

[C#] 
// The endTag variable must be declared as a string
// in the class variable. Use the TagLeftChar,
// SlashChar, and TagRightChar fields and the 
// GetTagName method to assign a value to the
// endTag variable.
endTag = TagLeftChar + SlashChar + GetTagName(HtmlTextWriterTag.Font) + TagRightChar;

// Use the PushEndTag method to write the custom
// endTag string value as its parameter.
PushEndTag(endTag);

[C++] 
// The endTag variable must be declared as a String* in the class
// variable for this assignment to work. Use the
// TagLeftChar, SlashChar, and TagRightChar fields and the
// GetTagName method to assign a value to the endTag variable.
endTag = String::Concat( __box(TagLeftChar), __box(SlashChar), GetTagName(HtmlTextWriterTag::Font), __box(TagRightChar));

// Use the PushEndTag method to write the custom
// endTag String* value as its parameter.
PushEndTag(endTag);

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter 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: