How do you pass a JSON object to an MVC action parameters?

Posted by TimTam on Stack Overflow See other posts from Stack Overflow or by TimTam
Published on 2010-04-08T21:41:36Z Indexed on 2010/04/08 21:43 UTC
Read the original article Hit count: 182

Filed under:
|

I would like to pass

{"parameter1":true, "parameter2":false, "parameter3":true}

To my action

public JsonResult Action(bool parameter1, bool parameter2, bool parameter3)
{
    //...
}

Using JQueries ajax method using the JSON as the data parameter (data: {"parameter1...)

How do I accomplish this, right now my parameters aren't getting recognized on the server side.

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about JSON