0

I have tried many options like below with taking answers from many SO questions

filterContext.Result = new RedirectToRouteResult(new RouteValueDictionary(new { action = "Index", controller = "Home" }));
                        base.OnActionExecuting(filterContext);

filterContext.Result = new RedirectToRouteResult(new RouteValueDictionary(new { action = "Index", controller = "Home" }));
                        filterContext.Result.ExecuteResult(filterContext.Controller.ControllerContext);


filterContext.Result = new RedirectToRouteResult(new RouteValueDictionary(new { action = "Index", controller = "Home" }));
                        return;

filterContext.Result = new RedirectResult("~/");

But none of the options redirect, it calls index method of home controller but redirection is not working.

Please advise.

Thanks

Md. Parvez Alam
  • 4,326
  • 5
  • 48
  • 108

0 Answers0