asp.net mvc - Which redirect has precedence - the one in controller action or in ActionFilter's OnActionExecuted? -
It looks like I'm going to do something strange again ...
Status:
Public Override Zero Onset Accented (Action Accepting Contact Filter Context) {filterContext.Result = New RedirectROUrUrUUT (New Routing Valuation (New {action = "Action 2", Controller = "Experiment"})) ;}} Public Utility Controller {[Experiment] Public Action Insert Reminder Experiment () {Redirect Action ("Action 1", "Experiments");} Public Action Action 1 () {/ * ... *} Public Action Action 2 () {/ * ... * }} Then, which will be redirected? One of the controller actions, whether one in the action filter or both?
So I just confirmed one experiment which I expected.
ExperimentEntryPoint gives an ActionResult, Ar That is redirected to Action1.
OnActionAffected overwrites overwritten over the result before it comes to rest Framework will be processed when it is, it looks redirect Action2 order.
Good and clear.
Comments
Post a Comment