weimha
asked on
Edit Mask Extender for phone number hiding first character
I have a edit mast extender that should display a phone number like (573) 111-5555 but instead it shows (_73) 111-5555.
My code is shown below. What's wrong with it.
(I need to continue to show the edit mask even when not it that field).
My code is shown below. What's wrong with it.
(I need to continue to show the edit mask even when not it that field).
<asp:TextBox ID="txtNumber" runat="server"></asp:TextBox><cc1:MaskedEditExtender ID="txtNumber_MaskedEditExtender" runat="server"
Enabled="True" Mask="(999) 999-9999" TargetControlID="txtNumber" ClearMaskOnLostFocus="False" MaskType="Number" ErrorTooltipEnabled="True" AutoComplete="False">
</cc1:MaskedEditExtender>
I think you have set the masktype to number but () are not numbers so that could be a problem. Try changing the masktype.
ASKER
When I remove the masktype I get the following:
(735) 551-287_
in stead of (573) 555-1287.
(735) 551-287_
in stead of (573) 555-1287.
Try changing it to String instead of removing it.
ASKER
String (or string) as the masktype gives me the following runtime error:
Parser Error Message: Cannot create an object of type 'AjaxControlToolkit.Masked EditType' from its string representation 'string' for the 'MaskType' property.
String is also not an option from the drop down list so I had to type it in.
Parser Error Message: Cannot create an object of type 'AjaxControlToolkit.Masked
String is also not an option from the drop down list so I had to type it in.
What are the options in the dropdown?
ASKER
Date
DateTime
None
Number
Time
DateTime
None
Number
Time
Try with none then. I can think of anything else. If none does not help then its down to the control itself.
ASKER
None doesn't work either.
Then its down to the control itself. If you remove the (), does it work. If not then remove - as well and try.
ASKER
I removed the () and now it works.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.