在我的视图中,我想在编辑器字段中查看选中复选框的计数!我怎样才能提出我的请求?
控制器:如何在控制器中转换它?//
public ActionResult Create()
{
return View();
}
//
// POST: /Projects/Create
[HttpPost]
public ActionResult Create(PPM_Project project)
{
if (ModelState.IsValid)
{
db.Project.Add(project);
db.SaveChanges();
return RedirectToAction("Index");
}
ViewBag.Status = new SelectList(new string[] { "----------", "running", "on hold", "finished", "not started", "cancelled" });
return View(project);
}
视图:视图中要改变什么?
<div class="editor-label-AI">
@Html.LabelFor(model => model.Anzahl_Betroffene_BU_Einheiten)
</div>
<div class="editor-field-AZB">
@Html.EditorFor(model => model.Anzahl_Betroffene_BU_Einheiten)
@Html.ValidationMessageFor(model => model.Anzahl_Betroffene_BU_Einheiten)
</div>
在那里我想查看选中复选框的计数!
感谢帮助!