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

1.3k Views Asked by At

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 validated against? i.e. how i can just validate a particular custom validator is valid?

1

There are 1 best solutions below

0
On BEST ANSWER

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');