ASP.NET中的RangeValidator [英] RangeValidator in ASP.NET
本文介绍了ASP.NET中的RangeValidator的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好所有访客
我已经在网络表单上创建了一个文本框.
我的文本框id ="txtbalance".我想让用户输入最小值= 1000.
但是当我仅使用最小属性时,它的最大错误误差小于最小.
请任何人帮助我.
谢谢
TONY
Hi all visitors
i have create one textbox on my webform.
my textbox id="txtbalance". i want to let user input the minimum=1000.
but when i use property only minimum,it''ill error coz of the maximum less then minimun.
Please anyone help me about this.
Thanks
TONY
推荐答案
hi,
您的MaximumValue属性值必须大于1000,否则它将无法工作.作为参考,您可以在下面查看此示例
http://www.w3schools.com/aspnet/showasp.asp?filename=demo_rangevalidator2 [ ^ ]
希望这会有所帮助.
Your MaximumValue property value must be greater then 1000, otherwise it wont work. For reference you can check this example below
http://www.w3schools.com/aspnet/showasp.asp?filename=demo_rangevalidator2[^]
Hope this will help.
< asp:textbox id ="txtPassword" runat ="server" textmode ="Password" xmlns:asp =#unknown">
< asp:regularexpressionvalidator id ="REV1" runat ="server" errormessage =密码只能介于6到15个字符之间! xmlns:asp =#unknown">
ControlToValidate ="txtPassword" ValidationExpression ="[\ s \ S] {6,15}">
<asp:textbox id="txtPassword" runat="server" textmode="Password" xmlns:asp="#unknown">
<asp:regularexpressionvalidator id="REV1" runat="server" errormessage="Password can only be between 6 to 15 characters.!" xmlns:asp="#unknown">
ControlToValidate="txtPassword" ValidationExpression="[\s\S]{6,15}">
这篇关于ASP.NET中的RangeValidator的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文