A ValidationSummary
will show a list of errors on postback. As each field is fixed, it\'s validator is fired, and any validation text will disappear. I want to
Here's a server-side approach to get the onblur attribute on all TextBoxes (which should also work with Validation Groups):
this.Attributes.Add("onblur", string.Format("ValidationSummaryOnSubmit('{0}')", this.ValidationGroup);
<asp:TextBox>
tags will still work:
<system.web>
<pages>
<tagMapping>
<add tagType="System.Web.UI.WebControls.TextBox"
mappedTagType="MyControls.TextBoxEx"/>
</tagMapping>
</pages>
</system.web>
Another way would be to use ControlAdapters to add the attribute.
Relevant links:
Understanding ASP.NET Validation
MSDN - tagMapping Element for pages