Click here to Skip to main content
Click here to Skip to main content

Customize Validation Summary

, 30 Sep 2010 CPOL
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. 1st Best Asp.Net article of SEP 2010
  2. 2nd Best Asp.Net article of MAY 2011
 
Read More Articles...
Follow on   Twitter   Google+   LinkedIn

Comments and Discussions

 
QuestionThanks a lot! PinmemberMember 1101353914-Aug-14 9:06 
AnswerRe: Thanks a lot! PinprofessionalSunasara Imdadhusen17-Aug-14 23:43 
Question5/5 PinmemberVishal Dhobi28-Jun-13 9:37 
AnswerRe: 5/5 PinprofessionalSunasara Imdadhusen30-Jun-13 20:25 
GeneralMy vote of 5 Pinmemberdewesh Pushkar23-Jun-13 17:39 
GeneralRe: My vote of 5 PinprofessionalSunasara Imdadhusen23-Jun-13 23:32 
GeneralMy vote of 5 PinmemberSavalia Manoj M18-Oct-12 18:40 
GeneralRe: My vote of 5 PinmemberSunasara Imdadhusen18-Oct-12 18:46 
Questionquestion PinmemberMurali Jalari7-Apr-12 6:39 
AnswerRe: question PinmemberSunasara Imdadhusen8-Apr-12 18:58 
Questiongr8 work Pinmemberkukawalkar16-Mar-12 3:03 
AnswerRe: gr8 work PinmemberSunasara Imdadhusen19-Mar-12 19:02 
GeneralMy vote of 5 Pinmemberylsv11-Jan-12 3:33 
GeneralRe: My vote of 5 PinmemberSunasara Imdadhusen23-Feb-12 22:59 
GeneralMy vote of 5 Pinmemberrama charan19-Oct-11 21:19 
GeneralRe: My vote of 5 PinmemberSunasara Imdadhusen14-Dec-11 1:41 
GeneralMy vote of 5 PinmemberCS140124-Sep-11 0:28 
GeneralRe: My vote of 5 PinmemberSunasara Imdadhusen14-Dec-11 1:40 
GeneralMy vote of 5 PinmemberMauxel18-May-11 6:47 
GeneralRe: My vote of 5 PinmemberSunasara Imdadhusen10-Jul-11 18:27 
GeneralReson for my vote 5 PinmemberShahriar Iqbal Chowdhury28-Apr-11 11:39 
GeneralRe: Reson for my vote 5 PinmemberSunasara Imdadhusen2-May-11 22:52 
GeneralMy vote of 5 Pinmembernrutter17-Feb-11 3:08 
Very Nice
GeneralRe: My vote of 5 PinmemberSunasara Imdadhusen11-Apr-11 0:22 
GeneralMy vote of 5 Pinmemberhance_micle1-Dec-10 0:10 

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 | Mobile
Web03 | 2.8.141015.1 | Last Updated 30 Sep 2010
Article Copyright 2010 by Sunasara Imdadhusen
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid