Problem:
- Calendar application built using ASP.NET MVC2
- From the main calendar page, the user can select an add appointment link that brings up a form to create a new appointment.
- After the appointment is created, we want to return to the main calendar page, potentially with an error or confirmation message.
- There are other pages within the application that also link to the create form. The form should always return to the page that the user was on when they chose to create an appointment.
The basic flow is originating page -> form -> originating page.
In the form controller we don't want to hard code the return action, but rather say something like
Create(AppointmentModel model)
{
...
return RedirectToTheReferringAction(...)
Are their best practices for implementing this?