本文介绍了在asp.net中清空MaskedEditExtender的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 如果我的MaskedEditExtender在文本框中为空它将保存,但它会显示错误消息 当输入的数字无效时,应该出现错误信息。 /> MaskedEditExtender应该只在数字为invlid时工作 请帮帮我解决方案 MaskedEditExtender仅允许有效数据,如果你想在按键上显示错误信息,请使用javascript或MaskedEditValidator。 < asp:textbox id =TextBox1runat =serverxmlns:asp =#unknown> < asp:maskededitextender id =TextBox1_MaskedEditExtenderrunat =serverxmlns:asp =#unknown> CultureAMPMPlaceholder =CultureCurrencySymbolPlaceholder = CultureDateFormat =CultureDatePlaceholder =CultureDecimalPlaceholder = CultureThousandsPlaceholder =CultureTimePlaceholder =已启用=真 Mask =999999999M askType =NumberTargetControlID =TextBox1> if my MaskedEditExtender is empty on textbox the it will be save but it giving error message error message should be come when the enter number is invalid.MaskedEditExtender should be working only when the number is invlidplease help me 解决方案 MaskedEditExtender allows only valid data, if u want to display error message on keypress, use javascript or MaskedEditValidator. <asp:textbox id="TextBox1" runat="server" xmlns:asp="#unknown"> <asp:maskededitextender id="TextBox1_MaskedEditExtender" runat="server" xmlns:asp="#unknown"> CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True" Mask="999999999" MaskType="Number" TargetControlID="TextBox1"> 这篇关于在asp.net中清空MaskedEditExtender的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-23 23:43