How to check the boolean field CheckBox checked by default in ASP.NET MVC?

Raja
Posted by Raja under ASP.NET MVC category on | Points: 40 | Views : 10751
To check the boolean field checkbox checked by default in ASP.NET MVC, use CheckBoxFor html helper method.

@Html.CheckBoxFor(model => model.Active, new { @checked="checked"} )


Notice the 2nd parameter.

Thanks

Comments or Responses

Login to post response