System.Web.UI.WebControls.TextBoxMode Enumeration

Specifies the behavior mode of the text box.


public enum TextBoxMode


The System.Web.UI.WebControls.TextBoxMode enumeration represents the different display options for System.Web.UI.WebControls.TextBox controls.

TextBoxMode.SingleLine mode displays the System.Web.UI.WebControls.TextBox control as a single row. If the user enters text that exceeds the physical size of the System.Web.UI.WebControls.TextBox control, the text will scroll horizontally.

TextBoxMode.MultiLine mode displays the height of the System.Web.UI.WebControls.TextBox based on the TextBox.Rows property, and allows data entry on multiple lines. The text will automatically wrap if the TextBox.Wrap property is set to true. If the user enters text that exceeds the physical size of the System.Web.UI.WebControls.TextBox, the text will scroll accordingly and scroll bars will appear.

The behavior of TextBoxMode.Password mode is similar to TextBoxMode.SingleLine mode except that all characters entered in the System.Web.UI.WebControls.TextBox control are masked and are not saved in view state.

The remaining options correspond to type attribute values for the input element in the HTML5 specification.


Member NameDescription

Represents multiline entry mode.


Represents password entry mode.


Represents single-line entry mode.


Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0,