ers! I'm a bit of a noob with this whole MVC thing, and I have run into a problem that I need some help with.
I am currently working on a project for a company that manages foster children, and the main part of this project is an MVC web app for some forms that foster parents must regularly submit to the company. My biggest problem so far has been saving the data that has been entered into the form back to the database. But I recently had a breakthrough when I realized that I could do this:
public ActionResult SaveForm(FormChildTherapeuticWeeklyForm formData)
Which is super awesome, and works perfectly for that first form. But after adding two more forms:
public ActionResult SaveForm(FormChildBasicCareMonthlyProgressReport formData)
public ActionResult SaveForm(FormFosterFamilyRequestForRemovalOrDischarge formData)
I have begun to get a The current request for action 'SaveForm' on controller type 'FormsController' is ambiguous between the following action methods: error.
While I know that I could just name each of the actions differently, I wanted to see if there was a better way to go about this since I ran into this error.
A little more info: each of the three views are strongly-typed to one of the three models/classes.
As I said, I'm still a bit of a noob with the MVC stuff, but I will try my best to provide any other information that you might need.
Thanks!