控制验证 [英] validation on control
本文介绍了控制验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我要验证在不单击按钮的情况下更改为textbox2时不能为空的textbox1.
I want validate textbox1 that is can not be empty when I change to textbox2 without click the button.
推荐答案
U可以在onchange事件中使用javascript轻松完成此操作的textbox2,请检查textbox1是否为空或仅当textbox1中有某些值时才能启用textbox2
U can easily do this using javascript on onchange event of textbox2, check if textbox1 is empty or not or u can enable textbox2 only when there some value in textbox1
检查此
在Asp.net中,您可以使用RequiredFieldValidator进行相同的操作.
In Asp.net, you can use RequiredFieldValidator to do the same.
这篇关于控制验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文