I want to use bootstrap styled checkbox in my asp .net mvc form, however I find it very difficult. After hours looking for solution, I couldn't find anything that works for me.
Here is my HTML razor code, however checkbox doesn't show.
<div class="form-group">
@Html.LabelFor(c => c.IsSynchronize, new { @class = "col-sm-2 control-label" })
<div class="col-sm-10">
<div class="checkbox">
@Html.CheckBoxFor(model => model.IsSynchronize)
</div>
</div>
</div>
Here is rendered HTML :
<div class="checkbox">
<input data-val="true" data-val-required="Pole Synchronizacja jest wymagane." id="IsSynchronize" name="IsSynchronize" type="checkbox" value="true">
<input name="IsSynchronize" type="hidden" value="false">
</div>
How can I setup this simple thing in my form?
input type="checkbox"in your rendered html