locked
Two Masks in one MaskedEditExtender? RRS feed

  • Question

  • User1578460427 posted

    Wanting to use the following two telephone number masks in one MaskedEditExtender: Mask="99999 99999" and Mask="99999 999999"

    Therefore, can you combine two masks into one MaskedEditExtender mask?

    Got one mask working in the following code snippet.

    <asp:TextBox ID="tbPhone" runat="server" />
    <ajaxControlToolkit:MaskedEditExtender runat="server" ID="meePhone" TargetControlID="tbPhone" Mask="99999 99999" ClearMaskOnLostFocus="true" MaskType="Number" />

    Monday, August 22, 2016 10:02 AM

Answers

  • User-1142886626 posted

    Hi eThunderstorm,

    Therefore, can you combine two masks into one MaskedEditExtender mask?

    There seems to be no method combine two masks into one MaskedEditExtender. However, you could create the mask that you need and assign it to Mask property.

    You're going to have to write your own external JavaScript, or modify the MaskedEditExtender to do this.

    The “Mask="99999 99999"” and” Mask="99999 999999"”, you could use the later one. It includes the previous one.

    The following example is for your reference:

    http://www.newschool.edu/ajax/MaskedEdit/MaskedEdit.aspx

    Best Regards,

    Ailleen

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, August 23, 2016 9:09 AM