In Cshtml file I have created a checkbox and using that true or false value of check box, need to write the logic in controller
In cshtml file
@Html.Checkboxfor(m=>m.isChecked,new {id="isChecked"}) @Html.Label("Ischecked",new {id="lblIsChecked", @class = "control-label"
In Model.cs
public bool isChecked {get;set;}
In controller
Model model=new Model();
If(model.isChecked == true)
{
//Logic to write
}
While checking isCheked variable in controller, I'm getting only false. Clarify this.