Click here to Skip to main content
15,440,179 members
Articles / Web Development / CSS
Posted 29 Sep 2010


56 bookmarked

Customize Validation Summary

Rate me:
Please Sign up or sign in to vote.
4.86/5 (38 votes)
30 Sep 2010CPOL1 min read
The ASP.NET Validation Summary control with customized CSS and Style to display a summary of all validation errors that occur in a web page.


The ASP.NET Validation Summary control with Stylish and Customized CSS to display a summary of all validation errors occurred in a web page.


The error message displayed in this control is specified by the ErrorMessage property of each validation control. If the ErrorMessage property of the validation control is not set, no error message is displayed for that validation control.

Using the Code

The customized error message displayed in this control is specified by the following property of Controls and Validation Summary:

  1. Validation Control
    1. Text: (The icon to display when validation fails)
    2. ErrorMessage: (The text to display in the ValidationSummary control when validation fails. Note: This text will also be displayed in the validation control if the Text property is not set)
  2. Validation Summary
    1. DisplayMode: (Display the validation summary with BulletList)
    2. CssClass: (The CssClass property is used to set style or class to the ValidationSummary control. Validationsummary)
    3. HeaderText: (Display a header “Please correct the following:” in the ValidationSummary control)

HTML Structure


CSS Style


Points of Interest

This was done using only CSS tricks.

If you find some issues, bugs with it, just leave a comment or drop me an email. If you make any notes to this, let me know that too so I don't have to redo any of your hard work.

Please provide a "Vote" if this would be helpful.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Written By
Technical Lead Infostretch Ahmedabad-Gujarat
India India
Aspiring for a challenging carrier wherein I can learn, grow, expand and share my existing knowledge in meaningful and coherent way.

sunaSaRa Imdadhusen


  1. 2nd Best Mobile Article of January 2015
  2. 3rd Best Web Dev Article of May 2014
  3. 2nd Best Asp.Net article of MAY 2011
  4. 1st Best Asp.Net article of SEP 2010

Read More Articles...

Comments and Discussions

QuestionBackground for the validation summary Pin
chinnublr8-May-15 1:15
Memberchinnublr8-May-15 1:15 
QuestionThanks a lot! Pin
Member 1101353914-Aug-14 9:06
MemberMember 1101353914-Aug-14 9:06 
AnswerRe: Thanks a lot! Pin
Sunasara Imdadhusen17-Aug-14 23:43
professionalSunasara Imdadhusen17-Aug-14 23:43 
Question5/5 Pin
VishalSRajput28-Jun-13 9:37
MemberVishalSRajput28-Jun-13 9:37 
AnswerRe: 5/5 Pin
Sunasara Imdadhusen30-Jun-13 20:25
professionalSunasara Imdadhusen30-Jun-13 20:25 
GeneralMy vote of 5 Pin
dewesh Pushkar23-Jun-13 17:39
Memberdewesh Pushkar23-Jun-13 17:39 
GeneralRe: My vote of 5 Pin
Sunasara Imdadhusen23-Jun-13 23:32
professionalSunasara Imdadhusen23-Jun-13 23:32 
GeneralMy vote of 5 Pin
Savalia Manoj M18-Oct-12 18:40
MemberSavalia Manoj M18-Oct-12 18:40 
GeneralRe: My vote of 5 Pin
Sunasara Imdadhusen18-Oct-12 18:46
professionalSunasara Imdadhusen18-Oct-12 18:46 
Questionquestion Pin
Murali Jalari7-Apr-12 6:39
MemberMurali Jalari7-Apr-12 6:39 
AnswerRe: question Pin
Sunasara Imdadhusen8-Apr-12 18:58
professionalSunasara Imdadhusen8-Apr-12 18:58 
Questiongr8 work Pin
kukawalkar16-Mar-12 3:03
Memberkukawalkar16-Mar-12 3:03 
AnswerRe: gr8 work Pin
Sunasara Imdadhusen19-Mar-12 19:02
professionalSunasara Imdadhusen19-Mar-12 19:02 
GeneralMy vote of 5 Pin
ylsv11-Jan-12 3:33
Memberylsv11-Jan-12 3:33 
GeneralRe: My vote of 5 Pin
Sunasara Imdadhusen23-Feb-12 22:59
professionalSunasara Imdadhusen23-Feb-12 22:59 
GeneralMy vote of 5 Pin
rama charan19-Oct-11 21:19
Memberrama charan19-Oct-11 21:19 
GeneralRe: My vote of 5 Pin
Sunasara Imdadhusen14-Dec-11 1:41
professionalSunasara Imdadhusen14-Dec-11 1:41 
GeneralMy vote of 5 Pin
CS140124-Sep-11 0:28
MemberCS140124-Sep-11 0:28 
GeneralRe: My vote of 5 Pin
Sunasara Imdadhusen14-Dec-11 1:40
professionalSunasara Imdadhusen14-Dec-11 1:40 
GeneralMy vote of 5 Pin
Mauxel18-May-11 6:47
MemberMauxel18-May-11 6:47 
GeneralRe: My vote of 5 Pin
Sunasara Imdadhusen10-Jul-11 18:27
professionalSunasara Imdadhusen10-Jul-11 18:27 
GeneralReson for my vote 5 Pin
Shahriar Iqbal Chowdhury/Galib28-Apr-11 11:39
professionalShahriar Iqbal Chowdhury/Galib28-Apr-11 11:39 
GeneralRe: Reson for my vote 5 Pin
Sunasara Imdadhusen2-May-11 22:52
professionalSunasara Imdadhusen2-May-11 22:52 
GeneralMy vote of 5 Pin
nrutter17-Feb-11 3:08
Membernrutter17-Feb-11 3:08 
GeneralRe: My vote of 5 Pin
Sunasara Imdadhusen11-Apr-11 0:22
professionalSunasara Imdadhusen11-Apr-11 0:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.