itnifl
asked on
Submit all Razor forms on the page via Javascript/jQuery
I am using C# MVC with Razor.
I have a form tied to a model in a partial view that is rendered twice on a page, each with different model contents. They have each their save submit button:
Now I want a button that submits both forms at the same time, and that is not a part of the partialview that these forms consist of.
I was thinking some sort JavaScript / jQuery based method that gets fired and handles the whole thing.
Any suggestions?
I have a form tied to a model in a partial view that is rendered twice on a page, each with different model contents. They have each their save submit button:
<input type="submit" class="btn btn-primary" value="Save" />
This works perfectly. When pushing the button, the respective model in the respective form gets posted to the server and the server updates the changes.Now I want a button that submits both forms at the same time, and that is not a part of the partialview that these forms consist of.
I was thinking some sort JavaScript / jQuery based method that gets fired and handles the whole thing.
Any suggestions?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER