RadControls for ASP.NET AJAX RadTextBox is a simple input control for letting the user enter text values. It shares the common properties of all RadInput controls, including support for skins, styles for different states, empty message support, conditional postback on text change, flexible caret and button positioning, labels, and so on.
Specifying the text mode
RadTextBox can be used in three different modes:
Single-line mode: To use RadTextBox in single-line mode, set the TextMode property to "SingleLine". When TextMode is "SingleLine", the MaxLength property defines the number of characters the user can enter into the text box.
Multi-line mode: To use RadTextBox in multi-line mode, set the TextMode property to "MultiLine". When TextMode is "MultiLine", the Rows property specifies the number of rows the text box displays, and the Columns property specifies the number of characters in each row. The Wrap property determines whether the text value wraps when its width exceeds the value of the Columns property.
Password mode: To use RadTextBox in password mode, set the TextMode property to "Password". When TextMode is "Password", the text box behaves like single-line mode, except that all characters in the text box's value are masked out.
HTML5 input types
As of Q3 2011 RadTextBox provides support for the new HTML5 input types.
To leverage this functionality you can use the InputType property of the control
You can set to the following values for the mentioned property:
Text: RadTextBox renders an input of type text and allows entering any type of string.
Number: RadTextBox renders an input of type number and only numbers are recognized as valid entry.
Date: RadTextBox renders an input of type date and lets the user enter only dates.
Time: RadTextBox renders an input of type time and lets the user enter only time.
DateTime: RadTextBox renders an input of type datetime and allows for specifying the time part of the DateTime object.
Caution |
|---|
Note that not all browsers support HTML5 input types. Those which do not recognize the new input types currently behave as if the input is with type set to text. |
AutoComplete
RadTextBox supports the AutoComplete feature of browsers such as Internet Explorer and Netscape. To use the AutoComplete feature, simply set the AutoCompleteType property to the category you want the browser to use for maintaining an AutoComplete list.
Password Strength Checker
RadTextBox exposes the Password Strength Checker feature which allows you to specify your custom criteria for password strength and visualize an indicator to inform the user how strong is the typed password according to this criteria.
Text box value
RadTextBox uses the Text property to represent its value.
Using RadTextBox with other controls
You can use RadTextBox with other controls to enhance its functionality.
See Also