Solved

Edit Mask Extender for phone number hiding first character

Posted on 2009-04-07
11
1,538 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
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.…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

734 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