TTextBox displays a text box on the Web page for user input. The text displayed in the TTextBox component is specified or determined by using the Text property. You can create a SingleLine, a MultiLine, or a Password text box by setting the TextMode property. If the TTextBox component is a multiline text box, the number of rows it displays is determined by the Rows property, and the Wrap property can be used to determine whether to wrap the text in the component.
To specify the display width of the text box, in characters, set the Columns property. To prevent the text displayed in the component from being modified, set the ReadOnly property to true. If you want to limit the user input to a specified number of characters, set the MaxLength property.
Note, Text will be HTML encoded before it is displayed in the TTextBox component. If you don't want it to be so, set EncodeText to false.
Namespace: System.Web.UI.WebControls
Properties
Text, string, kept in viewstate
Gets or sets the text content of the TTextBox component.
EncodeText, boolean, default=true, kept in viewstate
Gets or sets the value indicating whether Text should be HTML-encoded when rendering.
TextMode, string, kept in viewstate
Gets or sets the behavior mode (SingleLine, MultiLine, or Password) of the TTextBox component.
MaxLength, integer, default=0, kept in viewstate
Gets or sets the maximum number of characters allowed in the text box.
Columns, integer, default=0, kept in viewstate
Gets or sets the display width of the text box in characters.
Rows, integer, default=0, kept in viewstate
Gets or sets the number of rows displayed in a multiline text box.
ReadOnly, boolean, default=false, kept in viewstate
Gets or sets a value indicating whether the contents of the TTextBox component can be changed.
Wrap, boolean, default=true, kept in viewstate
Gets or sets a value indicating whether the text content wraps within a multiline text box.
AutoTrim, boolean, default=false, kept in viewstate
Gets or sets a value indicating whether the input text should be trimmed space on both sides
automatically by the framework.
will occur whenever the user modifies the text in the TTextBox component and
then tabs out of the component.
AutoPostBack, boolean, default=false, kept in viewstate
Gets or sets a value indicating whether an automatic postback to the server
will occur whenever the user modifies the text in the TTextBox component and
then tabs out of the component.
Events
OnTextChanged Occurs when the content of the TTextBox component is changed.
a value indicating whether an automatic postback to the server will occur whenever the user modifies the text in the TTextBox component and then tabs out of the component.
This method is invoked when the value of the Text property changes between posts to the server.
The method raises 'OnTextChanged' event to fire up the event delegates. If you override this method, be sure to call the parent implementation so that the event delegates can be invoked.