Solved

Edit Mask Extender for phone number hiding first character

Posted on 2009-04-07
11
1,535 Views
Last Modified: 2012-06-21
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).
<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>

Open in new window

0
Comment
Question by:weimha
  • 6
  • 5
11 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 24095468
I think you have set the masktype to number but () are not numbers so that could be a problem. Try changing the masktype.
0
 

Author Comment

by:weimha
ID: 24097039
When I remove the masktype I get the following:
 
(735) 551-287_
in stead of (573) 555-1287.  
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 24097104
Try changing it to String instead of removing it.
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 

Author Comment

by:weimha
ID: 24097461
String (or string) as the masktype gives me the following runtime error:
Parser Error Message: Cannot create an object of type 'AjaxControlToolkit.MaskedEditType' 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.
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 24097536
What are the options in the dropdown?
0
 

Author Comment

by:weimha
ID: 24097564
Date
DateTime
None
Number
Time
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 24097655
Try with none then. I can think of anything else. If none does not help then its down to the control itself.
0
 

Author Comment

by:weimha
ID: 24097818
None doesn't work either.
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 24097825
Then its down to the control itself. If you remove the (), does it work. If not then remove - as well and try.
0
 

Author Comment

by:weimha
ID: 24131039
I removed the () and now it works.  
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 24135936
Then its the limitation of the control that it does not handle the extra characters within the numbers field.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question