MVC中Action过滤器(OnActionExecuting,OnActionExecuted,OnResultExecuting,OnResultExecued)
OnActionExecuting,OnActionExecuted,OnResultExecuting,OnResultExecuted从字面我们大概就知道他们运行的顺序了。示例:看四个方法的执行次序。定义一个继承ActionFilterAttribute并重写其内部方法的类。publicclassSimpleFilterAttribute:ActionFilterAttribute{publi