locked
Why AjaxMaskExtender doesn't work with backspace ? RRS feed

  • Question

  • User-886220824 posted

    I have used AJAX latest tool kit but AjaxMaskExtender doesn't work properly i.e. BackSpace doesn't in it. why ? 

    <div class="form-group">
                                    <label class="control-label" for="disabledInput">CNIC</label>
                                    <asp:TextBox ID="TextBoxCNIC" runat="server" MaxLength="15" Height="40px"
                                        CssClass="form-control"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidatorModel" runat="server" ControlToValidate="TextBoxCNIC"
                                        ErrorMessage="*" Display="Dynamic" ValidationGroup="0"></asp:RequiredFieldValidator>
                                    <cc1:MaskedEditExtender ID="MaskedEditExtenderCNIC" runat="server" TargetControlID="TextBoxCNIC"
                                        Mask="99999-9999999-9"
                                        MessageValidatorTip="true"
                                        OnFocusCssClass="MaskedEditFocus"
                                        OnInvalidCssClass="MaskedEditError"
                                        MaskType="Number"
                                        InputDirection="LeftToRight"
                                        ErrorTooltipEnabled="True">
                                    </cc1:MaskedEditExtender>
                                </div>
    Monday, January 11, 2016 9:14 PM

Answers

  • User-886220824 posted

    I did this all sir and nothing works. I searched and it appears to be a known issue in ajax Mask Edit Extender 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, January 13, 2016 12:28 PM

All replies

  • User61956409 posted

    Hi StackUnderflow,

    I have used AJAX latest tool kit but AjaxMaskExtender doesn't work properly i.e. BackSpace doesn't in it. why ? 

    It seems that you are using MaskedEditExtender and applying Bootstrap style in your web page. I create the following sample to reproduce your problem, the code works fine on my side.

    <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" />
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
    <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
    
    <div class="form-group">
        <label class="control-label" for="disabledInput">CNIC</label>
        <asp:TextBox ID="TextBoxCNIC" runat="server" MaxLength="15" Height="40px"
            CssClass="form-control"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidatorModel" runat="server" ControlToValidate="TextBoxCNIC"
            ErrorMessage="*" Display="Dynamic" ValidationGroup="0"></asp:RequiredFieldValidator>
        <asp:MaskedEditExtender ID="MaskedEditExtenderCNIC" runat="server" TargetControlID="TextBoxCNIC"
            Mask="99999-9999999-9"
            MessageValidatorTip="true"
            OnFocusCssClass="MaskedEditFocus"
            OnInvalidCssClass="MaskedEditError"
            MaskType="Number"
            InputDirection="LeftToRight"
            ErrorTooltipEnabled="True">
        </asp:MaskedEditExtender>
    </div>
    

    Best Regards,

    Fei Han



    Tuesday, January 12, 2016 5:12 AM
  • User-886220824 posted

    SIr I have already included these bootstrap files etc from my local project code. But doesn't work 

    Tuesday, January 12, 2016 10:01 AM
  • User61956409 posted

    Hi StackUnderflow,

    Firstly, you could try to create a new page using MaskedEditExtender without other controls , CSS styles and jQuery Plugins etc, then you could view the page in different browsers to check whether same problem will appear.

    Secondly, you could try to uninstall and reinstall AJAX Control Toolkit.

    Best Regards,

    Fei Han

    Wednesday, January 13, 2016 7:49 AM
  • User-886220824 posted

    I did this all sir and nothing works. I searched and it appears to be a known issue in ajax Mask Edit Extender 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, January 13, 2016 12:28 PM