Export (0) Print
Expand All
Expand Minimize

TextBoxMode Enumeration

Specifies the behavior mode of the text box.

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

public enum TextBoxMode

Member nameDescription
ColorRepresents color entry mode.
DateRepresents date entry mode.
DateTimeRepresents date-time entry mode.
DateTimeLocalRepresents local date-time entry mode.
EmailRepresents email address entry mode.
MonthRepresents month entry mode.
MultiLineRepresents multiline entry mode.
NumberRepresents number entry mode.
PasswordRepresents password entry mode.
PhoneRepresents phone number entry mode.
RangeRepresents numeric range entry mode.
SearchRepresents search string entry mode.
SingleLineRepresents single-line entry mode.
TimeRepresents time entry mode.
UrlRepresents URL entry mode.
WeekRepresents week entry mode.

The TextBoxMode enumeration represents the different display options for TextBox controls.

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

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

The behavior of Password mode is similar to SingleLine mode except that all characters entered in the 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.

TopicLocation
How to: Set a TextBox Web Server Control for Password EntryBuilding ASP .NET Web Applications
How to: Set a TextBox Web Server Control for Password EntryBuilding ASP .NET Web Applications

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Show:
© 2014 Microsoft