I have run into a problem using the MaskedEditExtender and have not seen this same issue anywhere else on the internet after searching.
I am trying to use a MaskedEditExtender on a TextBox. The Maks is “99-999-99-??9999”. The issue is with the “Any Charcter” Masked Charactes (the 2 question marks). Here is the issue I am having:
- I enter 13 characters in the “TextBox1” textbox. For example: 11-111-11-AA1111
- I click outside of the “TextBox1” textbox, so that it looses focus.
- I click back inside the “TextBox1” textbox again. When I do the value inside the textbox is now: 11-111-11--A1111. Notice that the first letter “A” in the texbox is now a dash.
- I then click outside of the “TextBox1” textbox again, so that it looses focus.
- Nex t I click inside the “TextBox1” textbox again. When I do the value inside the textbox is now: 11-111-11---1111. Now the second letter “A” in the textbox is also a dash.
I have a lot of code in the page. Here are the highlights:
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<cc1:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TextBox1" Mask="99-999-99-??9999" ClearMaskOnLostFocus="false"></cc1:MaskedEditExtender>
<asp:TextBox ID="TextBox1" runat="server" Enabled="false"></asp:TextBox>
Does anyone have a solution for this problem?
Thanks!