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

 
GeneralMy vote of 5 PinmemberCS140124-Sep-11 1:28 
GeneralRe: My vote of 5 PinmemberSunasara Imdadhusen14-Dec-11 2:40 
GeneralMy vote of 5 PinmemberMauxel18-May-11 7:47 
GeneralRe: My vote of 5 PinmemberSunasara Imdadhusen10-Jul-11 19:27 
GeneralReson for my vote 5 PinmemberShahriar Iqbal Chowdhury28-Apr-11 12:39 
Good workThumbs Up | :thumbsup: one sugestion cant we use css class instead of image tag under Text? Sounds cleaner approach to me. keep it up
GeneralRe: Reson for my vote 5 PinmemberSunasara Imdadhusen2-May-11 23:52 
GeneralMy vote of 5 Pinmembernrutter17-Feb-11 4:08 
GeneralRe: My vote of 5 PinmemberSunasara Imdadhusen11-Apr-11 1:22 
GeneralMy vote of 5 Pinmemberhance_micle1-Dec-10 1:10 
GeneralRe: My vote of 5 PinmemberSunasara Imdadhusen3-Feb-11 19:23 
GeneralMy vote of 4 PinmemberMember 24609926-Oct-10 2:25 
GeneralRe: My vote of 4 PinmemberSunasara Imdadhusen2-Dec-10 23:14 
GeneralRe: My vote of 4 PinprofessionalSunasara Imdadhusen22-Apr-14 3:44 
GeneralSuggestion PinmemberRichard Deeming5-Oct-10 8:29 
GeneralRe: Suggestion PinmemberSunasara Imdadhusen6-Oct-10 0:25 
Generaldownloading the zip file PinmemberTilewa30-Sep-10 1:06 
GeneralRe: downloading the zip file PinmemberSunasara Imdadhusen30-Sep-10 1:53 
GeneralRe: downloading the zip file PinmemberSunasara Imdadhusen30-Sep-10 2:08 
GeneralRe: downloading the zip file PinmemberTilewa30-Sep-10 2:10 
GeneralRe: downloading the zip file PinmemberSunasara Imdadhusen30-Sep-10 2:15 

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
Web04 | 2.8.141223.1 | Last Updated 30 Sep 2010
Article Copyright 2010 by Sunasara Imdadhusen
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid