在回发时,我的模型存在,但它的子对象Policy
为空。
我做错了什么?
控制器
[HttpPost]
public ActionResult Wizard([Bind(Include = "Policy")] InformationModel model, Directions direction)
{
return View(model);
}
模型
public class InformationModel
{
public GHCOPPAType Policy;
}
查看
@model GHCOMvc.Models.InformationModel
@using (Html.BeginForm("Wizard", "Policy", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
@Html.HiddenFor(m => m.Policy.Id)
<button class="btn btn-success" name="direction" value="Next">Next</button>
}