I would like to convey
{"id":1, "name":"stackoverflow", "parameter2":false, "parameter3":true}
To my action
public JsonResult Action(int id, string name, bool parameter2, bool parameter3)
{
}
Using the jQueries ajax method using JSON as a data parameter
$.ajax({
url: "target.aspx",
data: {"id":1, "name":"stackoverflow", "parameter2":false, "parameter3":true},
success: handleResponse
});
I see that in fiddler my JSON object is dispatched, but they are not tied to my action parameters. How to make them bind to parameters?
I do not want to bind an object to an action that contains my values, i.e. I do not want Action (MyCustomObjectToAcceptParameters json). I want every JSON property to be associated with every action parameter.
querystring, , JSON /, , - json . datamembers, , ints boolean.