title: How to disable a button more elegantly
body: <p>I have on one of my views the following razor code:</p>
  
  <pre><code>@if (item.PMApproved != true) {
                      &lt;input type="button" class="btnresetinvoice button" value="Reset" data-invoiceid="@item.InvoiceId" /&gt;
                  }
                  else {
                      &lt;input type="button" class="btnresetinvoice button" value="Reset" data-invoiceid="@item.InvoiceId" disabled="disabled" /&gt;
                  }
  </code></pre>
  
  <p>Pretty rough. Basically I want to disable the button under a certain condition as you'd be able to work out from the code. What would be a more desirable way of doing this?</p>