ASP.Net MVC - 发送的Javascript关联数组控制器 [英] ASP.Net MVC - Send Javascript Associative array to a controller

查看:99
本文介绍了ASP.Net MVC - 发送的Javascript关联数组控制器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想一个javascript关联数组传递给控制器​​。

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

推荐答案

检查JsonValueProvider在ASP.NET MVC 2期货。

Check JsonValueProvider in ASP.NET MVC 2 Futures.

<一个href=\"http://haacked.com/archive/2010/04/15/sending-json-to-an-asp-net-mvc-action-method-argument.aspx\"相对=nofollow称号=发送JSON来一个ASP.NET MVC操作方法参数>发送JSON到一个ASP.NET MVC操作方法参数

这篇关于ASP.Net MVC - 发送的Javascript关联数组控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆