hi all
i have code in view in cshtml
@foreach (var m1 in Model.hb1)
{
<div class="alert-info">
<input type="checkbox" name=@m1.hobby_id value=@m1.hobbyname checked />@m1.hobbyname
</div>
}
but i want to use @Html.CheckBoxFor() for model binding
how can do it
@foreach (var m1 in Model.hb1)
{
<div class="alert-info">
@Html.CheckBoxFor()
</div>
}
Help me