Redirecting to a different controller method - asp.net mvc

sapptyhanei

New Member
I'm currently revamping my application. I have a method called "Test" in my controller which is being currently being called my many pages. I've now created a new method called "TestNew" in my controller and I want few of my pages to be redirected to the new method.It would be great if you can let me know of a quick fix that can be done at one place so that by putting some condition like \[code\]if(viewName = "abc")\[/code\]then redirect to "TestNew", instead of making change across the application. I've tried doing something in \[code\]public override void OnActionExecuting(ActionExecutingContext filterContext)\[/code\]but this never gets called.Thanks in advance.
 
Back
Top