title: Change CSS classes from code
body: <p>It's easy to set <code>CssClass</code> in the code-behind, but this runs the risk of overwriting existing classes.</p>
  
  <p>I need to set certain elements to <code>ReadOnly = true;</code> and I'd like to apply a style as a visual cue that the item cannot be altered...easy enough:</p>
  
  <pre class="lang-cs prettyprint-override"><code>.CssClass += " ReadOnlyStyle";
  </code></pre>
  
  <p>But at times I will <em>also</em> need to change the same element to <code>ReadOnly = false;</code> which means that I will need to remove the CSS class that I set without removing any other styles that I might have assigned.</p>
  
  <p>What's the best way to do this?</p>