I have two ways of navigating to a form that I'm using. However, once this form has been submitted, I would like to return to the previous page that I was on. Is there a certain url path that I can navigate to based on which page I was on previously?
I'm using just a standard form and a mvc architecture.
Here's my controller for this form:
[HttpPost]
public ActionResult Create(CreateConversationViewModel model)
{
try
{
_ConversationManager.Create(model.Message, model.GetReceivers(), model.SenderId);
return RedirectToAction("Me", "People");
}
catch (ValidationException ex)
{
ex.AddToModelState(ViewData.ModelState);
}
return View(model);
}
when I return to the People/Me page, that would only redirect to one of the pages.