title: How do I move boolean logic out of my View?
body: <p>In my ASP.NET MVC View I pick a sprite based on a boolean value set in the model like this:</p>
  
  <pre><code>&lt;div class="sprite-icon_dog&lt;% =(Model.HasNewDog ? "_new" : "") %&gt;"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>This is ugly and I don't like it.</p>
  
  <p>My objective is to use the <code>sprite-icon_dog_new</code> if <code>Model.HasNewDog</code> is <code>true</code> and use <code>sprite-icon_dog</code> if <code>Model.HasNewDog</code> is false.</p>
  
  <p>What is a more elegant and more readable way to do this?</p>