Search code examples
asp.neterror-handlingvalidationsummary

Hide errors in ASP:ValidationSummary


Is there a way to hide the individual errors in a ASP:ValidationSummary so that only the HeaderText is displayed?

I'm using the ASP:RegularExpressionValidator to return the individual errors inline so I don't need them returned in the summary.


Solution

  • Typically, the Text property of a validator is displayed inline and the ErrorMessage property value is displayed in the ValidationSummary. Try not setting the ErrorMessage property or set it to an empty string and see if that creates the effect you are aiming for.