Hi
I have a textbox on my form where the user can enter the bankaccount. So I created added a textbox and a MaskedEditExtender. In the maskeditextender I created the mask for a valid banaccount. I don't want when the user exits the control that the mask will be lost so I setted the ClearMaskOnLostFocus property to false. I also added a MaskedEditValidator extender to check if the bankaccount is valid. I wrote a custom client function for validating the bankacount.
Everything works fine if I delete the property ClearMaskOnLostFocus="False", when I add this property, the clientside validating won't execute anymore and I always get the invalid message, even when I enter a valid bankaccount.
Is there a solution for this problem?
Thx
Comments: This fix (for an issue with 1 vote and 0 comments) has created an important issue (with 20+ votes and comments), logged as issue 27427 "MaskedEditExtender's ClearMaskOnLostFocus does not work" : https://ajaxcontroltoolkit.codeplex.com/workitem/27427 See that item for my detailed description of where the bug is with ajaxtoolkit source code, but basically the JS line added in this bug fix: wrapper.set_Value(this._beforeClearMaskText); set the texbox value back to the mask (even though ClearMaskOnLostFocus is set to true), and that is sent to the server for server validation, which fails (as the textbox value should have been blank). The changeset for this fix is here: https://ajaxcontroltoolkit.codeplex.com/SourceControl/changeset/f93bf51e71052b12b0751b51f14468ffd496c37b described as follow: f93bf51e71052b12b0751b51f14468ffd496c37b by Mohinder.j (1 download) May 1, 2013 8:59 AM issue15492 - fixed issue of MaskedEditExtender with ClearMaskOnLostFocus and with MaskedEditValidator with ClientValidationFunction.
I have a textbox on my form where the user can enter the bankaccount. So I created added a textbox and a MaskedEditExtender. In the maskeditextender I created the mask for a valid banaccount. I don't want when the user exits the control that the mask will be lost so I setted the ClearMaskOnLostFocus property to false. I also added a MaskedEditValidator extender to check if the bankaccount is valid. I wrote a custom client function for validating the bankacount.
Everything works fine if I delete the property ClearMaskOnLostFocus="False", when I add this property, the clientside validating won't execute anymore and I always get the invalid message, even when I enter a valid bankaccount.
Is there a solution for this problem?
Thx
Comments: This fix (for an issue with 1 vote and 0 comments) has created an important issue (with 20+ votes and comments), logged as issue 27427 "MaskedEditExtender's ClearMaskOnLostFocus does not work" : https://ajaxcontroltoolkit.codeplex.com/workitem/27427 See that item for my detailed description of where the bug is with ajaxtoolkit source code, but basically the JS line added in this bug fix: wrapper.set_Value(this._beforeClearMaskText); set the texbox value back to the mask (even though ClearMaskOnLostFocus is set to true), and that is sent to the server for server validation, which fails (as the textbox value should have been blank). The changeset for this fix is here: https://ajaxcontroltoolkit.codeplex.com/SourceControl/changeset/f93bf51e71052b12b0751b51f14468ffd496c37b described as follow: f93bf51e71052b12b0751b51f14468ffd496c37b by Mohinder.j (1 download) May 1, 2013 8:59 AM issue15492 - fixed issue of MaskedEditExtender with ClearMaskOnLostFocus and with MaskedEditValidator with ClientValidationFunction.