Click here to Skip to main content
11,645,889 members (67,034 online)
Click here to Skip to main content

Customize Validation Summary

, 30 Sep 2010 CPOL 77.5K 3.5K 55
Rate this:
Please Sign up or sign in to vote.
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.
ValidationSummaryScreen.png

Introduction

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

Background

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

VS-Page.png

CSS Style

VS-CSS.png

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.

License

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

Share

About the Author

Sunasara Imdadhusen
Software Developer (Senior) 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

AWARDS:
  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...

You may also be interested in...

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
Vishal Dhobi28-Jun-13 9:37
memberVishal Dhobi28-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
memberSunasara 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
memberSunasara 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
memberSunasara 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
memberSunasara 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
memberSunasara 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
memberSunasara 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
memberSunasara Imdadhusen10-Jul-11 18:27 
GeneralReson for my vote 5 Pin
Shahriar Iqbal Chowdhury28-Apr-11 11:39
memberShahriar Iqbal Chowdhury28-Apr-11 11:39 
GeneralRe: Reson for my vote 5 Pin
Sunasara Imdadhusen2-May-11 22:52
memberSunasara 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
memberSunasara Imdadhusen11-Apr-11 0:22 

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

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

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150731.1 | Last Updated 30 Sep 2010
Article Copyright 2010 by Sunasara Imdadhusen
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid