开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜