I have three classes – Employee, Project and TrainingProgram. Then I have a fourth class, TrainingRecord which consists of an Employee, the Project they trained for, the TrainingProgram they completed and the date they completed it on.
Users can create new TrainingRecords from two spots – either through an Employee (they select the Project and TrainingProgram, then submit) or through a Project (they select an Employee and a Training Program, then submit).
When inside the Create page for TrainingRecord, what’s the best way to tell which parent I came from (the details page of an Employee or the details page of a Project) and how would I redirect the page back to that parent after the new TrainingProgram is submitted?
You could pass a
returnUrlparameter to the controller action which indicates where to redirect to in case of success.