我可以将一个 Int 数组从 Ajax.ActionLink(来自我的视图)作为参数传递给 Controller
这是我的看法
@{
int [] IDArray = ViewBag.AllIds;
}
@Ajax.ActionLink("send", "SendtoSS", new { id= IDArray }, new AjaxOptions
{
OnBegin = "Routing",
UpdateTargetId = "dialog-model",
InsertionMode = InsertionMode.Replace
}, new { @class = "button" })
在我的控制器中
public ActionResult SendtoSS(int[] ID)
{
}