TextBox.Columns Property

Gets or sets the display width of the text box in characters.

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

public:
virtual property int Columns {
	int get ();
	void set (int value);
}
/** @property */
public int get_Columns ()

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

public function get Columns () : int

public function set Columns (value : int)

Property Value

The display width, in characters, of the text box. The default is 0, which indicates that the property is not set.

Exception typeCondition

ArgumentOutOfRangeException

The specified width is less than 0.

The following code example demonstrates how to use the Columns property to specify a width of 2 characters for the TextBox control.

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

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

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

Community Additions

ADD
Show: