HtmlTextWriter.Indent Property

Gets or sets the number of tab positions to indent the beginning of each line of markup.

Namespace: System.Web.UI
Assembly: System.Web (in system.web.dll)

public:
property int Indent {
	int get ();
	void set (int value);
}
/** @property */
public int get_Indent ()

/** @property */
public void set_Indent (int value)

public function get Indent () : int

public function set Indent (value : int)

Not applicable.

Property Value

The number of tab positions to indent each line.

Indentation is performed by writing the string that is specified by the tabString parameter of the HtmlTextWriter(TextWriter,String) constructor the number of times that are specified by the Indent property.

If the Indent property is set to a negative value, it is changed to 0 before being saved.

The following code example demonstrates how to increment the value that is assigned to the Indent property when attributes have been added to the opening tag of a <span> element and the RenderBeginTag method has been called. This increases the indentation for any markup that is rendered inside the <span> element.

No code example is currently available or this language may not be supported.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show: