c# - MVC Posting an Ajax call multiple times -
I have a MVC project with partial views. I now want to update the partial view with the AJAX call to the controller.
Javascript:
$ ('body'). On ("click", "# btn_add__row", function () {$ ("# div_partial_view"). Load ("/ subcodes / ador");});
Operator's action:
[HTTPGet] Public Action Result AddRow () {var Model = GetFullModel (); Model subcodes.Add (new db.moles.model.previousrouncingSubcode {param1 = null, paragraph2 = faucet, id = zero, paragraph3 = null}); Return partial view ("~ \\ visual \\ administration \\ _ subcodes.cshtml", model); }
...
Forms in partial view
@using (Html.BeginForm ("index", "AddRow" "The action just adds an empty line," admiration ", formameth.post, new {id =" form_subcodes ", name =" form_subcode "}) {...}
table .
However, this is working only once because the party is not refreshing the submit form button is not working even after that call. But refreshing is not an option because my address The States have to be witch because they are.
Now my question is, is AJAX the second option to refresh partial view without submitting AJAX? Or is there a positivity for sending post several times?
Comments
Post a Comment