I have no problems processing JQuery GET requests in a controller, however I cannot get any form data to POST. The following client snippet:
$.post(url,{name:"John"},function(result){
//process result
});
combined with a controller:
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Save(string name)
{
return Json("Success!");
}
will result in a NULL value for the name parameter when inspected inside the action method, whereas I expected name to be mapped to the method parameter. Also all other objects (Request.Form) etc. in this context seem to be NULL. I can do this with a $.get but I think I am supposed to do any operations with side-effects with POSTs. I am using ASP.NET MVC 1.0, JQuery 1.2.6 and IE7.
Thanks!
Update: see my answer below and humble apologies