I'm trying to add a list of checkbox items for a legacy ASP.NET MVC application.
Given the following code, I get the following error:
<td>@if (Model != null)
{
@Html.CheckBoxListFor(model => new[] { "yo" }, new[] { "hi" } );
}
</td>
Can anyone explain why this is missing / unable to be found?
When I click F12 on Html
in the code, this is the assembly/version of MVC:
Microsoft.AspNet.Mvc
5.2.7 Furthermore, when I try searching for CheckBoxListFor
in the MS docs, there's nothing returned. When i search for CheckBoxFor
there are results.
So does CheckBoxListFor
even exist any more for ASP.NET MVC 5?
It is not supported anymore on MVC 5.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.