开发者

Page_ClientValidate('') can i do this at a control level

开发者 https://www.devze.com 2023-02-09 20:21 出处:网络
Does anyone know the way i can do similar to Page_ClientValidate in a way that not all of the controls on the page will be valid开发者_StackOverflow中文版ated against? i.e. how i can just validate a p

Does anyone know the way i can do similar to Page_ClientValidate in a way that not all of the controls on the page will be valid开发者_StackOverflow中文版ated against? i.e. how i can just validate a particular custom validator is valid?


You can specify a ValidationGroup to group your controls. Then specify that string to the Page_ClientValidate function like so

<asp:TextBox id="text" runat="server" ValidationGroup="vld1" />
<asp:CheckBox id="check" runat="server" ValidationGroup="vld2" />

Page_ClientValidate('vld1');
0

精彩评论

暂无评论...
验证码 换一张
取 消