H
Hans Kesting
For those interested:
I solved a problem I had using a cssclass with validators. The textcolor
of the errormessage didn't want to follow the css.
Two solutions:
* when the validator is defined in the aspx/ascx, use a ForeColor=" "
attribute.
* when programmatically adding a validator, I couldn't set the
ForeColor property to some "ignore" value ("Transparent" or
FromArgb(0,0,0,0) did not work). Finally I solved this by adding
the "!important" specifier in the css-file ("color: red !important;")
The basic problem is that the Forecolor attribute of the validator
generates a "style" attribute in html. This is specified "closer"
to the html-element than some css-setting, so overrides this.
If anyone has a better solution for the second case (or the first),
feel free to reply!
I solved a problem I had using a cssclass with validators. The textcolor
of the errormessage didn't want to follow the css.
Two solutions:
* when the validator is defined in the aspx/ascx, use a ForeColor=" "
attribute.
* when programmatically adding a validator, I couldn't set the
ForeColor property to some "ignore" value ("Transparent" or
FromArgb(0,0,0,0) did not work). Finally I solved this by adding
the "!important" specifier in the css-file ("color: red !important;")
The basic problem is that the Forecolor attribute of the validator
generates a "style" attribute in html. This is specified "closer"
to the html-element than some css-setting, so overrides this.
If anyone has a better solution for the second case (or the first),
feel free to reply!