title: disable html button based on condition
body: <p>I'm trying to disable a button based on a condition in my MVC app.</p>
  
  <p>I came up with:</p>
  
  <pre><code>@if (!item.Validated &amp;&amp; HttpContext.Current.User.IsInRole("regionaladmin")) {
    &lt;input type="button" class="btnvalidate" value="Validate" data-invoiceid=@item.InvoiceId /&gt; &lt;span&gt;|&lt;/span&gt;
  }
  else {
    &lt;input type="button" class="btnvalidate" value="Validate" data-invoiceid=@item.InvoiceId disabled = "disabled" /&gt; &lt;span&gt;|&lt;/span&gt;
  }
  </code></pre>
  
  <p>But this seems rather rough.</p>
  
  <p>Can anybody suggest a better way to make this less lines?</p>