When exactly do OnResultExecuted and OnResultExecuting fire?

后端 未结 2 2140
执念已碎
执念已碎 2021-02-18 13:21

I\'m creating a custom ActionFilterAttribute in order to transform ViewResults and redirects into JsonResults during ajax requests. I\'ve

2条回答
  •  不知归路
    2021-02-18 13:53

    After looking for a while and trying to understand the accepted answer I found this. I believe this shows the order of Execution to be

    1. OnActionExecuting
    2. OnActionExecuted
    3. OnResultExecuting
    4. OnResultExecuted

    Check this link under listing 2. http://www.asp.net/mvc/overview/older-versions-1/controllers-and-routing/understanding-action-filters-cs

提交回复
热议问题