Return int from MVC Action with Ajax.BeginForm
I would do something like this:
public JsonResult Create(MyModel model){ return Json(new { Result = 1 });}using (Ajax.BeginForm("Create", new AjaxOptions { OnComplete = "function(data) { alert(data.get_response().get_object().Result); }" }))