【发布时间】:2009-10-26 13:45:01
【问题描述】:
我的视图页面有一个由学生列表表示的模型。
我想将该模型传递给控制器参数:
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult SendMail(List<Student> students)
{
.............
return View("Success",students)
}
我用 Ajax.ActionLink 试过这个:
<%= Ajax.ActionLink("Send Mail to list AT SCS", "SendMail", students = Model,
new AjaxOptions()
{
Confirm = "Are you sure you want to send mails?",
HttpMethod = "POST"
}
)%>
但是当我在 VS 中使用调试器时,我看到 List 是空的。 不能从视图向控制器发送列表吗?如果没有,我该如何解决?
【问题讨论】: