Asp.net MVC Ajax form that return Json to a javascript method.
- by Diego Correa
Hello guys, I have an ajax form that saves a object in the database then return a Message like this:
return Json(new {Message = "Message!"},
JsonRequestBehavior.AllowGet);
We are ok here, but I don't know HOW I'll get this result in the view to display in a jQuery modal. My ajax form is like the following and I want to get the result on the OnSuccess method:
<%using (Ajax.BeginForm("Form", "Controller", new AjaxOptions() { OnSuccess = "MethodThatIWantToGetTheJson" }))
Any ideas?