【发布时间】:2012-03-19 11:29:19
【问题描述】:
我有一个名为 Designs 的 ASP.net MVC 控制器,它有一个带有以下签名的操作:
public ActionResult Multiple(int[] ids)
但是,当我尝试使用 url 导航到此操作时:
http://localhost:54119/Designs/Multiple?ids=24041,24117
ids 参数始终为空。有没有办法让 MVC 将?ids= URL 查询参数转换为操作的数组?我已经看到有关使用操作过滤器的讨论,但据我所知,这仅适用于数组在请求数据中而不是在 URL 本身中传递的 POST。
【问题讨论】:
标签: c# asp.net-mvc asp.net-mvc-3 routes