views:

239

answers:

1

I am using an ASP.NET AJAX Masked Edit Extender to format phone numbers

<asp:TextBox ID="tbPhoneNumber" runat="server" />

<ajaxToolkit:MaskedEditExtender TargetControlID="tbPhoneNumber" Mask="(999)999-9999" MaskType="Number"
 InputDirection="LeftToRight" ClearMaskOnLostFocus="false" ClearTextOnInvalid="false" runat="server" AutoComplete="false" />

On the page load event I am trying to populate the phone textbox as follows:

    protected void Page_Load(object sender, EventArgs e)
    {
        tbPhoneNumber.Text = "(394)456-310";
    }

So there is one number which is missing at the end to make it a valid phone number. When the page loads I expected the value in the textbox to be (394)456-310_ But it displays (_39)445-6310 Why is this happening?

A: 

Take a look at the following Question:

http://stackoverflow.com/questions/2412542/databinding-int32-to-maskededitextender-enabled-textbox/2758169#2758169

This seems to be a common issue.

Felipe Fiali