当数字比另一个数字高20%或更低时,如何使验证器触发 [英] How to have a validator to fire when a number is 20% higher or lower then the other

查看:110
本文介绍了当数字比另一个数字高20%或更低时,如何使验证器触发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如果输入的数字高于或低于TextBox中自动填充数字的20%,有没有办法让验证器触发?

I wanted to know is there a way to have a Validator to fire if the number entered is higher or Lower than 20% of the number auto populated in the TextBox?

推荐答案

这就是您要找的内容: http:// msdn .microsoft.com / zh-cn / library / f70d09xt(v = vs.85).aspx [ ^ ]。您甚至可以在服务器端设置最大值和最小值[.cs文件]。
This is what you are looking for : http://msdn.microsoft.com/en-us/library/f70d09xt(v=vs.85).aspx[^]. You can even set Maximum and Minimum values at server side [.cs file].
Range1.MaximumValue=....//Calculate the value you want and apply it here 


这篇关于当数字比另一个数字高20%或更低时,如何使验证器触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆