troubleshooting Question

MaskedEdit empty textbox problem

Avatar of COHFL
COHFLFlag for United States of America asked on
ASP.NET
27 Comments1 Solution956 ViewsLast Modified:
Hi there,
I have a textbox that takes phone numbers from users. The field is not requiered but if you click on the textbox it expects a numbers and thats not what i want. How can i solved my issue?
attached is what i have.
Thanks for your help
<asp:TextBox ID="txtPhoneNumber" runat="server" Width="248px" ValidationGroup="MKE"/>
                                <ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender1" runat="server"
                                TargetControlID="txtPhoneNumber"
                                Mask="999-999-9999"
                                ClearMaskOnLostFocus="false"
                                ClearTextOnInvalid="true"
                                MessageValidatorTip="true"
                                OnFocusCssClass="MaskedEditFocus"
                                OnInvalidCssClass="MaskedEditError"
                                MaskType="None"
                                InputDirection="LeftToRight"
                                AcceptNegative="Left"
                                DisplayMoney="Left" Filtered="-"
                                ErrorTooltipEnabled="True" />
                                <ajaxToolkit:MaskedEditValidator ID="MaskedEditValidator1" runat="server"
                                ControlExtender="MaskedEditExtender1"
                                ControlToValidate="txtPhoneNumber"
                                IsValidEmpty="true" ValidationExpression ="[0-9]{3}\-[0-9]{3}\-[0-9]{4}"
                                InvalidValueMessage="input is invalid"
                                Display="Dynamic"
                                TooltipMessage="XXX-XXX-XXXX"
                                InvalidValueBlurredMessage="Please input the right phone number!"
                                ValidationGroup="MKE" />
ASKER CERTIFIED SOLUTION
COHFL

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 27 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 27 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros