FilteredTextBox Demonstration
FilteredTextBox is an extender which prevents a user from entering
invalid characters into a text box.
Note that since this effect can be avoided by deactivating JavaScript,
you should use this extender as a convenience for your users, but you
must never expect that the data being sent to the server consists of
"valid" chars only.
The math-symbols example above is initialized with this code:
<ajaxToolkit:FilteredTextBoxExtender ID="ftbe" runat="server"
TargetControlID="TextBox3"
FilterType="Custom, Numbers"
ValidChars="+-=/*()." />
- TargetControlID - The ID of the text box for this extender to operate on
- FilterType - A the type of filter to apply, as a comma-separated combination of Numbers, LowercaseLetters, UppercaseLetters, and Custom. If Custom is specified, the ValidChars field will be used in addition to other settings such as Numbers.
- ValidChars - A string consisting of all characters considered valid for the text field, if "Custom" is specified as the field type. Otherwise this parameter is ignored.