如何在每个回发上验证自定义验证器 [英] how to validate the custom validator on each postback
本文介绍了如何在每个回发上验证自定义验证器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,
我在gridview中有复选框。我在gridview.how的模板字段中使用自定义验证器,当我从一个复选框转到另一个复选框时,我想验证自定义验证器。怎么做。
Hello,
I have checkboxes inside the gridview. I have used custom validator for the checkboxes in the template field of gridview.how when iwant to validate the custom validator when i go from one check box to another. how to do it.
推荐答案
删除验证组和按钮
like below
<asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="ename,ename1 must match"
OnServerValidate="CustomValidator1_ServerValidate" ValidateEmptyText="true"></asp:CustomValidator>
<asp:Button ID="btnsubmit" runat="server" Text="Submit"/>
check it now
这篇关于如何在每个回发上验证自定义验证器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文