How to save Multiple Form Data with single button in Asp.Net MVC5

asp.net asp.net-mvc entity-framework-6 forms

Question

I have 2 Controllers Applicants And Applicants_academic_record.

When user click on Continue in Applicants Controller, it takes the user to Create Method of Applicants_academic_record .

When user Clicks on Back Button , it takes user back to Form of Applicants Controller.

I want to perform three tasks.

  1. Continue button should takes the user to other Controller but it should not save the data in Database but it should hold it.
  2. Back button should takes the user back to Applicants Controller and populates the fields with data that users entered earlier.
  3. Create Button at 2nd form should save the data at once. Means data of Current form and also of previous form.

This is my Applicants Form. Applicants Controller

This is my Applicants_Academic_record Form. Academic_Record Controller

1
0
9/9/2016 7:58:06 AM

Popular Answer

You need to use jQuery

  1. Continue button: hide the first form and show the second form ( academic details)
  2. Back button: hide the second form and show the first
  3. Save: make ur post action to take two objects the applicant and the academic details

I don't know if the both forms will be submitted , you need to test it.

In case it did not work with you , you can use ajax call

If you need further help, you are welcome to ask

Hope this will help you

0
9/9/2016 9:29:58 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow