0

I'm using latest toolkit (v18) and I have a strange behaviour when textbox receive focus. This is my markup:

<asp:textbox runat="server" maxlength="10" id="txtBadge" name="txtBadge" placeholder="Codice badge" required="required"></asp:textbox>
<asp:MaskedEditExtender runat="server" TargetControlID="txtBadge" Mask="9999999999" MaskType="Number" PromptCharacter="" />

I can correctly insert only numbers, but when txtBadge receive focus the text changes like this:

NORMAL I entered the badge number enter image description here

ODD I just clicked on the textbox enter image description here

When I click outside of the textbox, then it shows again the correct text. what can it depend on? Thanks

  • I asked on the github page of controltoolkit and it was marked as bug... so, waiting for them... https://github.com/DevExpress/AjaxControlToolkit/issues/406 – Gabriele Cozzolino Jan 25 '18 at 17:03

1 Answers1

0

Ok, on github they suggest me to use FilteredTextBoxExtender that I didn't know of. Now it works as expected.

<asp:TextBox runat="server" ID="TextBox1" MaxLength="10" />
<ajaxToolkit:FilteredTextBoxExtender
    runat="server"
    TargetControlID="TextBox1"
    FilterType="Numbers" />