Text Color

Topics: Validation Application Block
May 19, 2008 at 7:58 AM
Hi
in the Validation Application Block, if an error occurs, the error message is written out to the display in red text. Is it possible to configure this to be another color (for example "blue") or in bold etc?

For example, the html generated for one of my validators is the following:
<span id="ctl11_firstNameValidator" style="color:Red;">There was an error with the data supplied for "first name". The length should be between 1- 200.<br/></span>

How can I override style="color:Red;"? Should I use the "CssClass" parameter to achieve this?

Thanks,
Peter
May 19, 2008 at 2:32 PM
You can override the ForeColor property available for all ASP.NET validators.

Hope this helps,
Fernando


xdzgor wrote:
Hi
in the Validation Application Block, if an error occurs, the error message is written out to the display in red text. Is it possible to configure this to be another color (for example "blue") or in bold etc?

For example, the html generated for one of my validators is the following:
<span id="ctl11_firstNameValidator" style="color:Red;">There was an error with the data supplied for "first name". The length should be between 1- 200.<br/></span>

How can I override style="color:Red;"? Should I use the "CssClass" parameter to achieve this?

Thanks,
Peter