?
Solved

Edit Mask Extender for phone number hiding first character

Posted on 2009-04-07
11
Medium Priority
?
1,540 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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 1500 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses
Course of the Month10 days, 8 hours left to enroll

765 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