2

how do i go about modifying the display of the validationSummary control in asp.net i want to modify it completely not just modify the color of the text etc.has anyone got any sample code etc ??

thanks Niall

Somedeveloper
  • 817
  • 2
  • 14
  • 31

2 Answers2

3

The validation summary can be easily customized with css. Just give it a CssClass.

Here is an article:

http://weblogs.asp.net/alnurismail/archive/2008/10/16/asp-net-a-validationsummary-with-some-style.aspx

Or this:

http://aspnetresources.com/blog/pimpin_validation_summary_with_css

There are lots of examples to be found.

ScottE
  • 21,530
  • 18
  • 94
  • 131
  • thanks for your reply. I would like to do more than modify the look of the control. i should have made that clearer. I want to do some custom rendering in the control itself to populate text etc. The thing is that i am using validation summary control to display messages and would like to add seperation text between each of the validations so that user sees ValidationGroup Header and then errors and then validation group and then errors. let me know if what i am saying dosent make sense and i will try and explain differently. Using multiple validationSummary controls wont do the job for me. – Somedeveloper Jan 28 '11 at 11:52
  • This is still available in CSS. – ScottE Jan 28 '11 at 11:58
2

If you only want to change the view of items without css, this may help you: Display Mode property

Beytan Kurt
  • 2,203
  • 4
  • 34
  • 57