This question already has an answer here:

I am trying to avoid using Html.CheckBoxFor in MVC 5 because of the extra hidden input that is added into the DOM. Reason being i am using a template and the extra input kills the lovely css'd checkbox styling.

when doing this:

<input type="checkbox" 
id="@Html.IdFor(m => m.RememberMe)" 
name="@Html.NameFor(m => m.RememberMe)" 
value="true" checked="@(Model.RememberMe ? " checked" : String.Empty)" />

Related posts

Recent Viewed