actionresult

How do I pass a Dictionary as a parameter to an ActionResult method from jQuery/Ajax?

守給你的承諾、 提交于 2019-11-26 11:03:33
问题 I\'m using jQuery to make an Ajax call using an Http Post in ASP.NET MVC. I would like to be able to pass a Dictionary of values. The closest thing I could think of was to pass in a multi-dimensional array of strings, but the result that actually gets passed to the ActionResult method is a single dimensional string array containing a string concatenation of the \"key/value\" pair. For instance the first item in the below \"values\" array contains the below value: \"id,200\" Here\'s an example