Assume we have an action like:
public ActionResult Display(long Id){
//Do something
return RedirectToAction(//To the Caller)
}
So Display
action called by some Views, like:
Index View : @Html.ActionLink("Show", "Display", new { Id=@Model.Id } )
So I need in Display
: return RedirectToAction("Index")
Or
Edit View : @Html.ActionLink("Show", "Display", new { Id=@Model.Id } )
I need in Display
: return RedirectToAction("Edit")
and so on.
How can we find which action call Display
and in the end of the action returned to the caller action? what is your suggestion?