Latest web development tutorials

ASP.NET TextBox TextMode property

TextBox controls TextBox controls

Definition and Usage

TextMode property sets or returns the behavior patterns of the TextBox control.

grammar

<asp:TextBox TextMode="mode" runat="server" />
属性 描述
mode TextMode 枚举值之一。默认值为 SingleLine。

可能的值:

  • SingleLine - 默认。表示单行输入模式。
  • MultiLine - 表示多行输入模式。
  • Password - 表示密码输入模式。


Examples

The following examples are to text mode TextBox control is set to "Password": The following example sets the text mode of a TextBox control to "Password":

<form runat="server">
<asp:TextBox id="tb1" runat="server" TextMode="Password" />
</form>

The demonstration >>

TextBox controls TextBox controls