title: Add Css class to div from controller C#
body: <p>What would be the best way to add/remove a css class to a div from the controller?</p>
  
  <p>I have a div in a razor view like so (simplified)</p>
  
  <pre><code>&lt;div id="divToToggle" class="hidden"&gt;
       //content
  &lt;/div&gt;
  </code></pre>
  
  <p>In my controller, depending if there is content or not, I want to add or review that class="hidden".</p>
  
  <pre><code>if (model.name.HasAValue())
  {
      model.company = Method();
      //Toggle div to visible here.
  }
  </code></pre>
  
  <p>I have thought about making a new property in the model and setting that value and then in the razor view doing like class="@Model.CssName" However, I have numerous tabs to deal with and don't want to clutter the model up with another set of css properties.  What would be the most efficient way to do this?</p>