ASP.Net MVC - Send Javascript Associative array to a controller

巧了我就是萌 提交于 2019-12-11 02:09:55

问题


I'm trying to pass a javascript associative array to a controller.

I can pass normal arrays into a controller with this:

public JsonResult ProductsByFacets(List<string> facets)

but this won't work with associative arrays


回答1:


Check JsonValueProvider in ASP.NET MVC 2 Futures.

Sending JSON to an ASP.NET MVC Action Method Argument



来源:https://stackoverflow.com/questions/3308674/asp-net-mvc-send-javascript-associative-array-to-a-controller

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!