Solved

Edit Mask Extender for phone number hiding first character

Posted on 2009-04-07
11
1,539 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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 

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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

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…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

689 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