Solved

Edit Mask Extender for phone number hiding first character

Posted on 2009-04-07
11
1,534 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
 

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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now