0
我的查看页面有一个由学生列表代表的模型。如何在ASP.Net MVC中将对象列表传递给[Post]控制器参数?
我想传递模型控制器参数:
[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,我看到了列表是空的。 无法从视图向控制器发送列表?如果不是,我该如何解决这个问题?
它的工作原理,谢谢! 我之前没有接受答案,因为直到现在我还没有尝试。 – andreiursan 2009-11-11 08:49:15