ASP.NET MaskedEditExtender issue
Posted
by Eyla
on Stack Overflow
See other posts from Stack Overflow
or by Eyla
Published on 2010-03-12T23:00:33Z
Indexed on
2010/03/12
23:07 UTC
Read the original article
Hit count: 400
asp.net-ajax
I have asp.net textbox with MaskedEditExtender.
I set ClearTextOnInvalid property to ture so when invalid text is entered should clear the text.
in my case I have mask=(999)999-9999, when I enter forexample 4 number should then the focus lost should clear the text because i did not enter complete number that fit the mask??
what I want to clear the text when the focus lost if no complete number has entered!!
here is my code:
<asp:TextBox ID="txtHomePhone" runat="server" Style="top: 147px; left: 543px; position: absolute;
height: 22px; width: 128px" ></asp:TextBox>
<cc1:MaskedEditExtender ID="txtHomePhone_MEE" runat="server"
CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder=""
CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder=""
CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True"
Mask="(999)999-9999" TargetControlID="txtHomePhone" AutoComplete="False"
ClearMaskOnLostFocus="true"
ClearTextOnInvalid="True">
</cc1:MaskedEditExtender>
© Stack Overflow or respective owner