If the controls are server controls (which I assume they are), you could
loop through your control collection, and when you run across a validator,
you can add an attribute to it:
myValidator.Attributes("class") = "myCssClass"
NOTE: myCssClass is the class name within your CSS file.
This might not be the best way to do it, but it does work. I know there is
also a CSS class property of web controls, I think it would be accessed like
this (but I'm unsure):
myValidator.CssClass = "myCssClass"
"Mark" <mf****@idonotlikespam.cce.umn.edu> wrote in message
news:eF*************@TK2MSFTNGP12.phx.gbl...
We have Validators embedded in an asp table server control. The table
server control is necessary and cannot be replaced. We want to apply CSS
formatting to the validators, but the validators have a default RED font
that appears to be difficult to remove. We could hard code in a blank
font color into the .aspx html for each validator, but that would defeat the
purpose of the CSS.
Is there a way to change the default RED color of validators in an entire
project or a different hack?
Thanks in advance.
Mark