TextBox Control
The TextBox
control can be used for both user input and read-only text display.
It can be configured to be any one of the following: single-line,
multiline, or to accept passwords. If multiline, it automatically
wraps, unless the Wrap property is set to false
.
The text it contains can exceed the length of the control displayed
on the page.
Table 5-2 lists many of the common properties specific to the TextBox control. If any of these attributes are omitted from the control, then the default value will apply.
Table 5-2. Some properties specific to the TextBox control
Name |
Type |
Get |
Set |
Values |
Description |
---|---|---|---|---|---|
AutoPostBack |
Boolean |
x |
x |
|
Determines if automatic
postback to server will occur if user
changes contents of control. If |
Columns |
Int32 |
x |
x |
|
Width of the text box in characters. Default is |
MaxLength |
Int32 |
x |
x |
|
Maximum number of characters allowed. If MaxLength is greater than Columns, then only a portion of the string will display without using the home, end, or arrow keys. Its default value is |
ReadOnly |
Boolean |
x |
x |
|
If |
Get Programming ASP .NET 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.