i have a checkbox in view based upon database data(boolean) it should be checked and unchecked when that view loading
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
<div class="container customdiv">
<ul class="list-group">
<li class="list-group-item">
Super User
<div class="material-switch pull-right col-lg-5">
@Html.CheckBoxFor(model => model.SuperUsrChk)
<label for="SuperUsrChk" class="label-primary"></label>
</div>
</li>
</ul>
</div>
In contoller action
public ActionResult UserAccount()
{
UserAccount UA = new UserAccount();
UA.SuperUsrChk = true; //Checkbox model
return View(UA);
}
Model
public bool SuperUsrChk { get; set; }
public bool RequestorUsrChk { get; set; }
I am getting output as i need , please help on this