TextBoxMode TextBoxMode TextBoxMode TextBoxMode Enum


Specifies the behavior mode of the text box.

public enum class TextBoxMode
public enum TextBoxMode
type TextBoxMode = 
Public Enum TextBoxMode


Color Color Color Color 3

Represents color entry mode.

Date Date Date Date 4

Represents date entry mode.

DateTime DateTime DateTime DateTime 5

Represents date-time entry mode.

DateTimeLocal DateTimeLocal DateTimeLocal DateTimeLocal 6

Represents local date-time entry mode.

Email Email Email Email 7

Represents email address entry mode.

Month Month Month Month 8

Represents month entry mode.

MultiLine MultiLine MultiLine MultiLine 1

Represents multiline entry mode.

Number Number Number Number 9

Represents number entry mode.

Password Password Password Password 2

Represents password entry mode.

Phone Phone Phone Phone 12

Represents phone number entry mode.

Range Range Range Range 10

Represents numeric range entry mode.


Represents search string entry mode.

SingleLine SingleLine SingleLine SingleLine 0

Represents single-line entry mode.

Time Time Time Time 13

Represents time entry mode.

Url Url Url Url 14

Represents URL entry mode.

Week Week Week Week 15

Represents 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 TextBox.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.

Applies to

See also