Example of Checkboxfor helper with entity framework
Html helper class have two methods to generate checkboxes(<input type=‘checkbox’>
Checkbox() –Loosely Typed
MvcHtmlString CheckBox(string name, bool isChecked, object htmlAttributes)
Checkboxfor() –Strongly Typed
(It generates <input type=”checkbox”> element for the model property specified using a lambda expression.)
MvcHtmlString CheckBoxFor(<Expression<Func<TModel,TValue>> expression, object htmlAttributes)
It generates <input type=‘checkbox’ /> and <input type=‘hidden’ value=false or true>
Part -1
Part -2
how to pass the data i marked to database?
hi .I want to send the checkbox selected value from partial view to Main view then submit the data ..how can i achieve.