ASP.NET TextBox TextModeProperty


TextBox 控件TextBox Control

Definition and Usage

The TextMode property is used to set or return the behavior mode of a TextBox control.

Syntax

<asp:TextBox TextMode="mode" runat="server" />
 
Property Description
mode One of the TextMode enumeration values. The default value is SingleLine.

Possible values:

  • SingleLine - Default. Indicates single-line input mode.
  • MultiLine - Indicates multi-line input mode.
  • Password - Indicates password input mode.


Example

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>

Demo Example »

TextBox 控件TextBox Control Other Extensions