I can get the current action name by using the following code
var currentActionName = ControllerContext.RouteData.GetRequiredString("action");
but is it possible to get the previous action name as well?
I can get the current action name by using the following code
var currentActionName = ControllerContext.RouteData.GetRequiredString("action");
but is it possible to get the previous action name as well?
Why not saving it in a session variable?
Try this:
Session["lastAction"] = Session["actualAction"];
Session["actualAction"] = ControllerContext.RouteData.GetRequiredString("action");