after an asynchronous call using jquery, how can I return to a separate view?
this is my caller view:
<script type="text/javascript"> function Run() { $.ajax({ type: "POST", cache: false, url: "/Home/Run", data: $("#form_run").serializeArray(), dataType: "json" }); } </script> <form action="javascript:return true;" method="post" id="form_run"> <input type="text" id="nome" name="nome" /> <input type="text" id="cognome" name="cognome" /> <input type="submit" name="submit" value="Run" onclick="Run();" /> </form>
this is my controller action:
[AcceptVerbs(HttpVerbs.Post)] public ActionResult Run(string nome, string cognome) { return View("Result"); }
can't display the result view. How?
source share