我得到了一个error
OnActionExecuted:没有找到合适的方法覆盖
public override void OnActionExecuted(ActionExecutingContext filterContext)
{
filterContext.HttpContext.Response.Cache.SetCacheability(HttpCacheability.NoCache);
filterContext.HttpContext.Response.Cache.SetNoStore();
}我想在方法执行之后执行这段代码。
发布于 2019-08-08 05:21:03
以下是方法签名:
protected virtual void OnActionExecuted (System.Web.Mvc.ActionExecutedContext filterContext);重写中有不正确的参数类型。它需要一个类型为ActionExecutedContext而不是ActionExecutingContext的参数。请参阅OnActionExecuted
它应该是:
public override void OnActionExecuted(ActionExecutedContext filterContext)
{
// code goes here
} https://stackoverflow.com/questions/57405423
复制相似问题