当ValidationSummary在页面上显示错误时,我试图调用javascript函数。
这可能吗?
最佳答案
如果找不到其他方法来制作“ JS用户函数”,则可以尝试以下方法:
var oldValidationSummaryOnSubmit = ValidationSummaryOnSubmit;
var ValidationSummaryOnSubmit = function(validationGroup){
/*
my code before
*/
// call old (MS ASP.NET function) ValidationSummaryOnSubmit
oldValidationSummaryOnSubmit(validationGroup);
/*
my code after
*/
}