RadMaskedTextBox uses a mask to distinguish between proper and improper user input. You can use a mask to specify the format for the input such as IP address, credit card number, currency, etc.
You can also specify prompt character by setting the PromptChar property. To allow the RadMaskedTextBox to display its content in multiple lines you have to set the TextMode property to MultiLine.
When a RadMaskedTextBox control is displayed at run time, it represents the mask as a series of prompt characters and optional literal characters. Each editable mask position, is shown with a single prompt character. For example, the number sign (#) is often used as prompt for a numeric character.
The examples below illustrates the usage of the RadMaskedTextBox for IP address:
IP Example

| ASPX source code |
Copy Code |
|
<rad:RadMaskedTextBox id="RadMaskedTextBox1" runat="server" Mask="<0..255>.<0..255>.<0..255>.<0..255>" > </rad:RadMaskedTextBox> |
Social Secuirity Number Example

| ASPX source code |
Copy Code |
|
<rad:RadMaskedTextBox id="RadMaskedTextBox1" runat="server" Mask="##-##-####" PromptChar="X"> </rad:RadMaskedTextBox> |
See Also