I cannot figure out why my one field (Phone Number) isn't holding its MaskedEditExtender after you click away, while the others work just fine. I compared the properties and controls and they're all the same.
I suspect that it has something to do with my Validation Expression not matching my Mask, but when I tried adding in the exceptions for the symbols [() and -], it didn't work (or I did it wrong).
The problem child:
<div class="col-xs-6">
<asp:TextBox
runat="server"
ID="TextBox_PhoneNumber"
class="form-control"
Style="max-width: 145px" />
<asp:RegularExpressionValidator
ID="RegularExpressionValidator_PhoneNumber"
runat="server"
ControlToValidate="TextBox_PhoneNumber"
ErrorMessage="Invalid phone number."
ValidationExpression="^[2-9]\d{2}\d{3}\d{4}$"
Display="Dynamic"
SetFocusOnError="True"
Font-Bold="true"
ForeColor="red"
ValidationGroup="ValidationGroup_Main" />
<asp:RequiredFieldValidator
runat="server"
ID="RequiredFieldValidator_PhoneNumber"
ControlToValidate="TextBox_PhoneNumber"
ErrorMessage="Employee Info: Phone Number is blank."
Text="Required"
class="text-right"
Display="Dynamic"
Font-Bold="true"
ForeColor="red"
ValidationGroup="ValidationGroup_Main" />
<ajaxToolkit:MaskedEditExtender ID="maskededitextender_PhoneNumber" runat="server" TargetControlID="TextBox_PhoneNumber" Mask="(999) 999-9999" MaskType="Number" AcceptNegative="None" AutoComplete="false" />
Resulting in (while entering the phone number):
Resulting in (after clicking away after entry):
How can I get that mask to stick?