CheckBoxFor - want to return false when checked, true when unchecked

324 views Asked by At

I am using CheckBoxFor, and right now when the checkbox is checked it is returning True, and vice versa. However, I want to do the opposite, aka: Checked -> return false and Unchecked -> return true

Is this possible?

<label id="var1" class="btn btn-ip-select ">
   @Html.CheckBoxFor(m => m.var1)
   Variable 1
</label>
<label id="var2" class="btn btn-ip-select">
   @Html.CheckBoxFor(m => m.var2)
   Variable 2
</label>
0

There are 0 answers