TextBox Web Server Control Overview
TheWeb server control provides a way for users to type information into a Web Forms page, including text, numbers, and dates. You can configure the TextBox Web server control in several ways, as described in the following table.
Users type information in a single line. You can optionally limit the number of characters that the control accepts.
Like a single-line TextBox control, but the characters users type are masked with asterisks (*) to hide them.
Users type information in a box that displays multiple lines and allows text wrapping.
User input in a Web Forms page can include potentially malicious client script. By default, the Web Forms page validates that user input does not include script or HTML elements. For more information, see.
The TextBox control raises aevent when the user leaves the control. By default, the event is not raised immediately; instead, it is raised on the server when the Web Forms page is submitted. However, you can specify that the TextBox control should submit the page to the server as soon as the user leaves the field.
The TextBox Web server control does not raise an event each time the user enters a keystroke, only when the user leaves the control. You can have the TextBox control raise client-side events that you handle in client script, which can be useful for responding to individual keystrokes. For details, see.
Many browsers support an auto-completion feature that helps users fill information into text boxes based on values the users have entered previously. The exact behavior of auto-completion depends on the browser. In general, browsers store values based on the text box's name attribute; any text box with the same name, even on a different page, will offer the same values to the user. Some browsers also support a vCard schema, which allows users to create a profile in the browser with predefined values for first name, last name, telephone number, e-mail address, and so on.
The TextBox control supports anproperty that provides you with these options for controlling how the browser works with auto-completion:
Disable auto-completion. If you do not want the browser to offer auto-completion for a text box, you can disable it.
Specify a vCard value to use as the auto-completion value for the field. The browser must support the vCard schema.