Asp.net MVC Ajax form that return Json to a javascript method.
Posted
by Diego Correa
on Stack Overflow
See other posts from Stack Overflow
or by Diego Correa
Published on 2010-04-27T17:48:08Z
Indexed on
2010/04/27
18:03 UTC
Read the original article
Hit count: 252
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?
© Stack Overflow or respective owner