TextBoxMode 枚举


指定文本框的行为模式。Specifies the behavior mode of the text box.

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


Color 3

表示颜色输入模式。Represents color entry mode.

Date 4

表示日期输入模式。Represents date entry mode.

DateTime 5

表示日期-时间输入模式。Represents date-time entry mode.

DateTimeLocal 6

表示本地日期-时间输入模式。Represents local date-time entry mode.

Email 7

表示电子邮件地址输入模式。Represents email address entry mode.

Month 8

表示月份输入模式。Represents month entry mode.

MultiLine 1

表示多行输入模式。Represents multiline entry mode.

Number 9

表示数字输入模式。Represents number entry mode.

Password 2

表示密码输入模式。Represents password entry mode.

Phone 12

表示电话号码输入模式。Represents phone number entry mode.

Range 10

表示数值范围输入模式。Represents numeric range entry mode.


表示搜索字符串输入模式。Represents search string entry mode.

SingleLine 0

表示单行输入模式。Represents single-line entry mode.

Time 13

表示时间输入模式。Represents time entry mode.

Url 14

表示 URL 输入模式。Represents URL entry mode.

Week 15

表示周输入模式。Represents week entry mode.


枚举表示TextBox控件的不同显示选项。 TextBoxModeThe TextBoxMode enumeration represents the different display options for TextBox controls.

SingleLinemode 将TextBox控件显示为单个行。SingleLine mode displays the TextBox control as a single row. 如果用户输入的文本超出了TextBox控件的物理大小, 则会在水平方向上滚动文本。If the user enters text that exceeds the physical size of the TextBox control, the text will scroll horizontally.

MultiLine模式基于TextBox Rows属性显示的高度, 并允许在多行上输入数据。MultiLine mode displays the height of the TextBox based on the Rows property, and allows data entry on multiple lines. 如果TextBox.Wrap将属性设置为true, 文本将自动换行。The text will automatically wrap if the TextBox.Wrap property is set to true. 如果用户输入的文本超出了的TextBox物理大小, 则会相应地滚动文本, 并将显示滚动条。If the user enters text that exceeds the physical size of the TextBox, the text will scroll accordingly and scroll bars will appear.

Password模式的行为SingleLine类似于模式, 不同之处在于, 在TextBox控件中输入的所有字符都将被屏蔽, 并且不会保存在视图状态中。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.

其余选项对应type于 HTML5 规范中的input元素的属性值。The remaining options correspond to type attribute values for the input element in the HTML5 specification.