Can I pass a querystring that translates to a List<int> on the server?

Posted by Denis Hoctor on Stack Overflow See other posts from Stack Overflow or by Denis Hoctor
Published on 2010-06-13T16:03:22Z Indexed on 2010/06/13 16:12 UTC
Read the original article Hit count: 400

Filed under:
|
|
|
|

Hi all,

I'm writing a Google Maps app that requests data from the server using jQuery's $.ajax() to send the request to my MVC Contoller. This control expects a List for the category types. What should the querystring look like for this?

I've tried

http://localhost:9090/mapamenities?amenityTypes=1,5

http://localhost:9090/mapamenities?amenityTypes=[1,5]

with no luck.

The SearchRquest attribute I'm trying to bind to is public List AmenityTypes { get; set; }

Thanks Denis

© Stack Overflow or respective owner

Related posts about c#

Related posts about jQuery