|
Enhancing the ASP.Net Validation Summary Control
Get the complete article here
The standard Validation Summary control in ASP.Net provides some useful functionality that enhances ASP.Net validation. However, there are instances when the standard functionality is not quite enough. For example, a client-side validator won’t suffice when input data must be validated against data in a database. Scott Juranek has provided a good way to add validation messages to a ValidationSummary control when server-side validation takes place. His project can be found on CodeProject. His project explains an instance where client-side validation is not practical when validating data from a database.
Scott’s example covers another scenario that I recently encountered. Say you have a DataGrid that has multiple editable columns and rows and each cell has its own validator. The validators each have the same values for the ErrorMessage and Text properties. When there are multiple failures in the DataGrid, the ValidationSummary control will display a message for each failed validator which could result in multiple messages listed, each with the same message. The result is a long list of repeated error messages in the ValidationSummary control.
Get the complete article here |
|