求解,报错如下
Additional information: Templates can be used only with field access, property access, single-dimension array index, or single-parameter custom indexer expressions.
你看看CheckBoxFor怎么用,m.Snel设置id和name的
按照下面这种写法改一下试试
@if(model.Snel>=0){ @Html.CheckBoxFor(model => model.Snel, new { @checked = true }) } else { @Html.CheckBoxFor(model => model.Snel, new { @checked = false }) }