Home > Net >  About asp.net MVC OnActionExecuted rewrite the succession
About asp.net MVC OnActionExecuted rewrite the succession

Time:10-05

If I have A class A inherited Controller and rewrite the OnActionExecuted method (override), then have A class B inherited class A and rewritten again OnActionExecuted method, finally has A class C inherited class B, now of class C an ActionResult method sends A request, please OnActionExecuted will be how to call?

CodePudding user response:

Specific how to call, see you
Base. OnActionExecuting (filterContext); Method is when to call,

CodePudding user response:

In simple terms, is to see your OnActionExecuted or OnActionExecuting
Base. OnActionExecut written before the logic or logic,

CodePudding user response:

No order, it will only perform OnActionExecuted under category B,
Remaining as moderator said, if you call in the class B base. OnActionExecuted to invoke the OnActionExecuted A
  • Related