Using the TextBox Control

You can use the TextBox control to display three different types of input fields depending on the value of its TextMode property. The TextMode property accepts the following three values:

SingleLine Displays a single-line input field.

MultiLine Displays a multiline input field.

Password Displays a single-line input field in which the text is hidden.

The page in Listing 2.6 contains three TextBox controls that illustrate all three of the TextMode values (see Figure 2.5).

Figure 2.5. Displaying TextBox controls with different values for TextMode.

image

Listing 2.6. ShowTextBox.aspx

You can use the following properties ...

Get ASP.NET 4 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.