I am trying to format a text box so that a user can enter a phone number and he would automatically place it in the following format: (999) 999-9999
I tried to use MaskedEditExtender, it works, but it is completely opposite to what I need.
when I click on the field, it shows the correct format, but as soon as I exit, it still shows only 9999999999
how can I do this so that the user ONLY enters numbers and he puts a dash and parentheses where he should automatically (what he is doing now), but keep the format when I exit it.
<asp:TextBox ID="txtSuperPhone" runat="server" CssClass="myinputstyle" /> <asp:MaskedEditExtender ID="mskSuperPhone" runat="server" TargetControlID="txtSuperPhone" Mask="(999)999-9999"/>
source share