Spencer Prahl

.Net Developer & Architect

  Home  ::  Contact  ::  Syndication  ::  Login
  9 Posts  ::  3 Stories  ::  8 Comments  ::  5 Trackbacks  
Enhancing the ASP.Net Validation Summary Control

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

Feedback

# re: Enhancing the ASP.Net Validation Summary Control
How about a validator that will validate multiple fields so that you don't have to have an instance with duplicated logic/data for each cell in your row? Maybe a ColumnValidator where you would only need one physical control to validate all the cells in that column.


Post Feedback
Title: 
Name: 
Url: 

Comments: 
Enter the code you see: