MaskedTextBox

This web control almost completely mimics the standard Windows MaskedTextBox (it uses the same mask templates, on entering text visible mask is highlighted...). This component works in Internet Explorer, Opera and Mozilla. The "Mask Edit" control enables developers to set mask property by which the user input to "Mask Edit" can be restricted.

Mask: To limit user input in a text box, user must set appropriate mask for that text box. This mask can be set through the Mask property of "Mask Edit" text box control.

The following table provides information about the characters sets used for mask creation:



Mask Character Set

Description

0

Digit placeholder (Entry Required).

9

Digit placeholder (Entry Optional). For example: 0 � 9.

@, $, %, (, ), -, {, }, [, ], ;, :, ', ", (space), (comma), ., /, _, =, +

Special Character - matched exactly.

\

Treat the next character in the mask string as a literal. This allows you to include the '#', '&', 'A', and '?' characters in the mask. This character is treated as a literal for masking purposes.

&

Character placeholder. Valid values for this placeholder are ANSI characters in the following ranges: 32-126 and 128-255.

>

Convert all the characters that follow to uppercase.

<

Convert all the characters that follow to lowercase.

A

Alphanumeric character placeholder (Entry Required). For example: a � z, A � Z, or 0 � 9.

a

Alphanumeric character placeholder (Entry Optional).

?

Letter placeholder. For example: a � z or A � Z.

Literal

All other symbols are displayed as literals; that is, as themselves.

This control has onChange and onIsNotValid client side events.

 

Masked TextBox Mask Description Mask
Phone Number (000)000-0000
Social Security Number 000-00-0000
Short Date 00/00/0000 00:00
Custom (>aaa)