0

我的视图模型:

public class SendFileDeviceViewModel
  {
    public string DeviceName { get; set; }
    public int DeviceId { get; set; }
    public string ManagementGroupName { get; set; }
    public int ManagementGroupId { get; set; }
  }

  public class SendFileManagementGroupViewModel
  {
    public string ThisManagementGroupName { get; set; }
    public List<SendFileDeviceViewModel> DeviceList { get; set; }
  }

我的观点:

@model Ceridian.Wfm.DeviceManager.Models.Terminals.SendFileManagementGroupViewModel
@{
  ViewBag.Title = "Index";
  Layout = "~/Areas/Terminals/Views/Shared/Master/_TerminalLayout.cshtml";
}
@section termimalContent {


  @using (Html.BeginForm())
  {
    @Html.ValidationSummary(true)

    foreach (var dev in Model.DeviceList)
    {


    <fieldset>
        <legend>@dev.DeviceName - [ @dev.ManagementGroupName ]</legend>

          @Html.CheckBoxFor(m => m.

        </fieldset>
    }
    }
  }

lambda 返回我的整个模型,而不是dev. 任何人都可以帮忙吗

4

1 回答 1

0

抱歉,在 SO 上找到了这个

@Html.CheckBoxFor(m => dev.reloadConfiguration)
于 2013-04-22T07:42:02.783 回答