开发者

ASP.NET Validation Summary

开发者 https://www.devze.com 2022-12-10 20:14 出处:网络
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?

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

精彩评论

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