title: Checkbox disabled attribute in ASP.NET MVC
body: <p>My ViewModel has a property of selected and selectable.  Both are boolean.  I would like my view to have a checkbox that is enabled when selectable is true and disabled when selectable is false.  What is the proper razor syntax to accomplish this ?</p>
  
  <p>I tried the code below on a list of items in a table.  Every row comes back with a disabled checkbox regardless of selectable value.</p>
  
  <pre><code> @Html.CheckBoxFor(modelItem =&gt; item.Selected, new { @disabled = !item.Selectable })
  </code></pre>