To auto check the checkbox in ASP.MVC using CheckBoxFor use below approach.
<div class="editor-field">
@{
Model.IsActive = true;
}
@Html.CheckBoxFor(m => m.IsActive)
</div>
In the above code, first I set the IsActive property of the model that is bounded to this page to true and then used Html.CheckBoxFor helper element and set its value to the Active property of the model object.
This will do the trick.
Regards,
Sheo Narayan
http://www.dotnetfunda.com