【发布时间】:2012-03-22 20:56:52
【问题描述】:
我们如何在 MVC3 中运行每个 Action 之前运行一个方法?
我知道我们可以对OnActionExecuting 使用以下方法:
public class ValidateUserSessionFilterAttribute : ActionFilterAttribute
{
public override void OnActionExecuting(ActionExecutingContext filterContext)
{
...
}
}
但是我们怎样才能在 ActionExecuting 之前运行一个方法呢?
【问题讨论】:
标签: c# asp.net asp.net-mvc-3 action-filter