I have a redirection like:
return RedirectToAction(MVC.Area.Controller.Index(institutionId));
This redirects to a controller which inherits from another controller which has an action filter defined like so:
protected override void OnActionExecuting(ActionExecutingContext filterContext)
{
var institutionId = filterContext.ActionParameters["institutionId"];
var institution = InstitutionRepository.GetById((int)institutionId);
...other code
}
the ActionExecutingContext.ActionParameters contain the institutionId but the value is always NULL. I've tried redirecting to route as well but that gives the same output. What bothers me is that when I look at the route, the institutionId seems to be passed with query parameters (Area/Controller?institutionId=17 instead of Area/Controller/17)
MVC stands for T4MVC, which is framework used to avoid hardcoding strings in the redirects.