Sunday, May 16, 2010

ValidationSummary control is not red anymore

We upgraded to ASP.NET 4.0.
Then we discovered that ValidationSummary controls are not red anymore.

It turned out that The BaseValidator class and validation controls that derive from it no longer render red text by default.

Why did ASP.NET team make that breaking change?
Because they wanted to render cleaner and more CSS compliant HTML

Anyway, here's the solution:
Add ~/App_Themes/Default/
Put there:
    <asp:ValidationSummary runat="server" ForeColor="Red" />

That worked for PostJobFree.
Hope it would help you too.

No comments:


About Me

My photo
Email me: