4
           <asp:TextBox ID="txttime" runat="server" CssClass="TextBox">'
                 Width="60px" Enabled="false" ></asp:TextBox>

          <ajax:MaskedEditExtender ID="ajaxtime" runat="server" AcceptNegative="None"
         Enabled="True" TargetControlID="txttime" MaskType="Time" AcceptAMPM="true"
       ask="99:99" CultureName="en-CA"  AutoComplete="true" AutoCompleteValue="99:00"/>

In Above code delete or backspace key in textbox working Firefox and IE but not working in Chrome.. Please Help..

Any Suggestion....??

Boss
  • 445
  • 2
  • 8
  • 24

4 Answers4

0

Google chrome has such more issues with controls. You can specifically check version you are running on & what ascii values it takes? when you try to use keys. One more thing, check your textbox markup whether it is correct or not?

0

It seems this was a bug in the MaskedEditExtender. See this CodePlex issue.

You could try updating to the latest version at it states it was fixed in the April 2013 release.

Alternatively there is a small fix available here.

Brett Postin
  • 11,215
  • 10
  • 60
  • 95
0

Add below code, it should work fine.Thanks.

protected void Page_Init(object sender, EventArgs e)
        {
            try
            {
                if (!ClientScript.IsStartupScriptRegistered(GetType(), "MaskedEditFix"))
                {
                    ClientScript.RegisterStartupScript(GetType(), "MaskedEditFix", String.Format("<script type='text/javascript' src='{0}'></script>", Page.ResolveUrl("../Javascript/MaskedEditFix.js")));
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
emilliman5
  • 5,816
  • 3
  • 27
  • 37
-3

below code works fine, replace TargetControlID="txtPhone" by your text field id.

<ajax:MaskedEditExtender ID="textPhone_MaskedEditExtender" MaskType="None" runat="server"
                                CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat=""
                                CultureDatePlaceholder="" CultureDecimalPlaceholder="" CultureThousandsPlaceholder=""
                                CultureTimePlaceholder="" Enabled="True" TargetControlID="txtPhone" Mask="(999)-999-9999"
                                AutoComplete="true" ClearMaskOnLostFocus="false" CultureName="en-US">
                            </ajax:MaskedEditExtender>
Sumit Pathak
  • 671
  • 1
  • 6
  • 25
  • Can you elaborate further on this? The OP doesn't have a control with ID txtPhone - it sounds like you left out part of your answer. – Derek Dec 05 '13 at 15:40