【发布时间】:2011-03-03 22:19:38
【问题描述】:
public ActionResult DoSomething()
{
return View("Index", new IndexModel { Foo = new List<string>() { "*" });
}
其中 Index.cshtml 有一个包含 @Html.HiddenFor(m => m.Foo) 的表单
public ActionResult ProcessForm(IndexModel model)
{
}
在 ProcessForm 中,您的 model.Foo 包含一个字符串,内容如下:
System.Collections.Generic.List`1[System.String]
我很困惑……
【问题讨论】:
标签: asp.net-mvc-3 razor hidden-field