title: How can I add a dynamic class to an HTML tag?
body: <p>For example, in the following example I want to add a class called "noDisplay" based on a certain condition. (1==1, for simplicity's sake.)</p>
  
  <p>I tried:</p>
  
  <pre><code>&lt;tr class='@if (1== 1) { Html.Raw("noDisplay"); }'&gt;
  </code></pre>
  
  <p>And:</p>
  
  <pre><code>@if (1 == 1) { 
   @: class="noDisplay"
  }&gt;
  </code></pre>