I can get the current action name by using the following code
var cu开发者_StackOverflow中文版rrentActionName = 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");
精彩评论