我的观点型号:
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
的内容。可以帮忙吗
答案 0 :(得分:0)
抱歉,在SO
上找到了这个@Html.CheckBoxFor(m => dev.reloadConfiguration)