This documentation is archived and is not being maintained.

HtmlTextWriter.DefaultTabString Field

Represents a single tab character.

[Visual Basic]
Public Const DefaultTabString As String
[C#]
public const string DefaultTabString;
[C++]
public: const String* DefaultTabString;
[JScript]
public var DefaultTabString : String;

Remarks

The single tab is represented by the ASCII 9 character.

Example

[Visual Basic] 
' Override the OutputTabs method to tab the number
' of spaces defined by the Indent variable.

Protected Overrides Sub OutputTabs()
   ' Output the 'DefaultTabString' for 'Indent' number of times.
   Dim i As Integer
   For i = 0 To Indent - 1
      Write(DefaultTabString)
   Next i
   MyBase.OutputTabs()
End Sub 'OutputTabs

[C#] 
// Override the OutputTabs method to tab the number
// of spaces defined by the Indent variable.

protected override void OutputTabs()
{
   // Output the 'DefaultTabString' for 'Indent' number of times.
   for(int i = 0; i < Indent; i++)
      Write(DefaultTabString);
   base.OutputTabs();
}

[C++] 
// Override the OutputTabs method to tab the number
// of spaces defined by the Indent variable.
 protected:
 
void OutputTabs() {
   // Output the 'DefaultTabString' for 'Indent' number of times.
   for (int i = 0; i < Indent; i++)
      Write(DefaultTabString);
   __super::OutputTabs();
}

[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: