I'm working with WebForms. HtmlTableCell
does not have a CssClass
property. I can do this:
<td class="whatever"></td>
But not this:
myTableCell.Class = "whatever";
How can I apply a CSS class to my HtmlTableCell
?
Got it.
myTableCell.Attributes.Add("class", "whatever");
Attributes property works too for CSS style.
For example:
myTableCell.Attributes.Add("style", "height: 30px; border: 1px solid;")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With