How to add an additional css class from code behind using ASP.NET?
Add additional CssClass like this:
txt.CssClass = txt.CssClass + " Error"
The above can also be abbraviated as:
txt.CssClass += " Error"
I know that you were looking for a quick one-liner. However, this previous answer may prove useful going forward:
How to add more than 1 class to an element in ASP.NET?