开发者

ASP.NET CustomValidator - is possible to change ClientValidationFunction on client side?

Is it possible to change ClientValidationFunction of ASP.NET CustomValidator on client side (from开发者_JAVA技巧 javascript)? I would like to select ClientValidationFunction dynamically in javascript, to perform conditional validation (ClientValidationFunction will be set to validator depending on actions, which user does on page).

Is this approach possible, and how?

Thanks


I'm not sure if this is possible, but I would call from my client validation function separate functions belonging to my specified condition.

function myVal(sender, args)
{
   if ( [condition 1] ) return func_cond1( sender, args );
   else return func_cond2( sender, args );
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜