Change css class depending on label's text
Posted
by abatishchev
on Stack Overflow
See other posts from Stack Overflow
or by abatishchev
Published on 2010-05-16T11:51:41Z
Indexed on
2010/05/16
12:00 UTC
Read the original article
Hit count: 176
I have asp:Table
with number of asp:Label
inside asp:FormView
, it represents short stats info.
I need to set Label.CssClass
to "red" if it's text isn't "0".
Currently I do this on FormView.DataBound
event. But think that it's better to use JavaScript
and probably jQuery
. How can I do that?
© Stack Overflow or respective owner