The following example demonstrates using enumeration parts in the MaskFormat property. This example uses the C1InputMask control with the Phone Number mask: (999) 000-0000.
To create a phone number mask using the Tasks menu:
To display the Phone Number value with a 412 area code, complete the following tasks:
To create a phone number mask using .html markup:
To display the Phone Number value with a 412 area code, use the following markup in the .aspx page:
To write code in Source View
<cc1:C1InputMask ID="C1InputMask1" runat="server"
Mask="(999) 000-0000"
Text="412"
</cc1:C1InputMask>
Note: Character "9" acts as a masking element: digit or space, optional. Character "0" acts as a masking element: digit, required. This masking element will accept any single digit between 0 and 9.
This topic illustrates the following:
Run the project and notice that the Phone Number mask with the 412 text is displayed in the Web browser, as shown here: