title: If statement inside div tag with Razor MVC3
body: <p>I'm trying to have an if statement inside a class property of a div tag using the Razor View Engine. How can i get this working and is there perhaps a better way to do this?</p>
  
  <pre><code>&lt;div class="eventDay @if(e.Value.Count &lt; 1){Html.Raw("noEvents");}"&gt;
  </code></pre>
  
  <p>If there are no events the CSS class <em>noEvents</em> should be added. Expected result:</p>
  
  <pre><code>&lt;div class="eventDay noEvents"&gt;
  </code></pre>