asp.net mvc - MVC - AJAX Post - Open Partial View in Dialog Box -
in bootstrap dialog box, have ajax form :-
@using (ajax.beginform("method", "settings", formmethod.post, null)) { <div class="container"> <div class="row form-horizontal" id="fieldslist"> .... <button type="submit" class="btn">back</button> } [httppost] public actionresult method(formcollection form) { .... homecoming partialview("pagepartial",model); }
when nail submit button, dialog box closes & see new page.
how open partialview
in dialog itself?
try as
@using (ajax.beginform("method", "settings", new ajaxoption{httpmethod="post", onsuccess="onsuccess"})) { <div class="container"> <div class="row form-horizontal" id="fieldslist"> .... <button type="submit" class="btn">back</button> } <script> function onsuccess(result){ //your code } </script>
ajax asp.net-mvc
No comments:
Post a Comment