Reputation: 3445
I'm using $.ajax asynchronously to send some json to a controller marked with [HttpPost], like this:
$.ajax({
url: location.href,
type: 'post',
contentType: 'application/json',
dataType: 'json',
data: theJson,
async: true,
});
This works fine, but the method expects an ActionResult, I guess with a new view. But I don't want that - I just want to do a little update on the server without updating the page.
Is there any way to set up a method on the server to do the update, independent of the view?
Upvotes: 1
Views: 838