示例> (就像这个) 我是 MVC 的初学者,我开发了多个列表框,我想为我的列表框添加多个复选框,我该怎么办?它?给我一个解决方案
查看
<div class="col-md-3" style="left:-40px;top:-22px;">
@Html.ListBoxFor(a => a.FId, new MultiSelectList(ViewBag.Fs, "FId", "FCode"), new { size = 8, Class = "form-control", title = "", style = " margin-top:6px;font-size:small;" })
@Html.ValidationMessageFor(a => a.FId)
</div>
QR ViewModel
public int[] FId { get; set; }
public MultiSelectList Fds { get; set; }