Search code examples
c#asp.netajaxcontroltoolkit

Telephone number is not displaying correctly in ajax control toolkit mask?


I have the following telephone number 866-234-5678.

I have an asp textbox and I am applying the following mask:

 <cc2:MaskedEditExtender ID="maskPhone" 
                         runat="server" 
                         ClearMaskOnLostFocus="false"
                         AutoComplete="false" 
                         MaskType="None" 
                         Mask="(999)-999-9999" 
                         InputDirection="LeftToRight"
                         TargetControlID="txtPhone">
 </cc2:MaskedEditExtender>

When I load a page with the textbox, the telephone number displays like the following:

(662)-345-678_


Solution

  • The mask states 4 digits for the last group. The underscore '_' displayed is the PromptCharacter of the MaskedEditExtender.