我正在编写一个google地图应用程序,它使用jquery的$.ajax()从服务器请求数据,将请求发送到我的asp.net mvc控制器。此控件需要一个舒适类型列表。这个Querystring应该是什么样子的?
我试过了
http://localhost:9090/mapamenities?amenityTypes=1,5
http://localhost:9090/mapamenities?amenityTypes=[1,5]
没有运气。
我试图绑定到的searchrquest属性是

public List<int> AmenityTypes { get; set; }

谢谢
丹尼斯

最佳答案

尝试?amenityTypes=1&amenityTypes=5

07-24 16:37