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 { [email protected] } )
So I need in Display
: return RedirectToAction("Index")
Or
Edit View : @Html.ActionLink("Show", "Display", new { [email protected] } )
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?
How about passing one more parameter along with id in the ActionLink method?
and
and in your action method, accept that as well