title: Setting checkbox values in MVC4
body: <p>In my HTML code i want to create checkboxes that are readonly and their value depends on a data that a get from the database. Setting the readonly property is fine and so is binding the checkbox with my model. But the value on my model (that came from the database) is integer, not boolean. Currently i'm doing it like this </p>
  
  <pre><code>@Html.CheckBox("myProperty", Model.Property == 2 ? true : false, new { @onclick = "return false" }) &lt;label&gt;Some text for the label&lt;/label&gt;
  </code></pre>
  
  <p>so i am wondering if there is any way to achieve this without the if statement</p>
  
  <p>thank you for any advice</p>