CustomValidator这个控件应该怎么使用才能执行客户端脚本
源码 <asp:CustomValidator id="CustomValidator1" style="Z-INDEX: 102; LEFT: 256px; POSITION: absolute; TOP: 64px"
runat="server" ErrorMessage="You are wrong!" ControlToValidate="TextBox1" ClientValidationFunction="Check"
Display="Dynamic"></asp:CustomValidator>
源码 <asp:CustomValidator id="CustomValidator1" style="Z-INDEX: 102; LEFT: 256px; POSITION: absolute; TOP: 64px"
runat="server" ErrorMessage="You are wrong!" ControlToValidate="TextBox1" ClientValidationFunction="Check"
Display="Dynamic"></asp:CustomValidator>
解决方案 »
- .net开发,还没遇到过这么写的,是不是太牛了?
- 如果div或者span元素中没有内容,如何触发鼠标事件?
- 请教一个元数据权限的问题
- 求救:Gloab.asax中的Application_Start被多次调用???
- 那位大侠提供一个论坛的源代码或者源代码下载,百分赠送!
- DataGrid如何显示两个相关联的表,或者用其它控件如何显示呢?谢谢!!
- VS中调试可用,IIS下面却不行?(急切盼望回答)
- javascript listbox 值
- 高手进 asp.net 能否实现数据上传追加.
- 100分求教
- 请教客户端中的name,id怎么拼的?有时是<input name="dgList:_ctl2:ucExchangeRate:unitprise"....有时是<input name="dgList$ctl02$ucExc
- javascript 如何验证服务器控件TextBox的值为空?
ClientValidationFunction="Check"在你的客户端应该有个SCRIPT写的 Check()函数,这样就能执行了
function Check(src, args){ // 函数原型
args.IsValid = (args.Value.length >= 8);
}
{
if (args.Value % 2==0)
args.IsValid=true;
else
args.IsValid=false;
return;
}