如何在MVC中添加Multiple Selected复选框列表

时间:2015-11-06 05:39:39

标签: asp.net asp.net-mvc

示例> enter image description here(就像这个) 我是 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; }

0 个答案:

没有答案