开发者

ASP.NET Validation Summary

Is it possible to have two Valida开发者_开发知识库tionSummary controls. One to display popup errors for some fields and one to display the standard summary for other fields?

Thanks


Yes, you can group validation using the ValidationGroup property on the form controls and the Summary control.

EDIT:

Using jQuery you could do something like this:

var validators = jQuery('.dataEntryFormTable').find("span[controltovalidate]");

validators.each(function()
{

var validatorEnabled = true;
        if (jQuery('#' + this.id).attr('enabled') == false) {
            validatorEnabled = false;
        }

if (validatorEnabled)
{
// Check if Valid
// then Get Mesage Text, assign to list of messages to display
}

}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜