title: ASP.NET MVC - RouteData set in filter action not bound to action method parameter
body: <p>I have an action filter which (among other things), adds stuff to the RouteData. The value, however, is not picked up by the parameter in my action method.  Any ideas why?</p>
  
  <p>Action Filter:</p>
  
  <pre><code>public class SomeFilter : FilterAttribute, IActionFilter
  {
      public void OnActionExecuting(ActionExecutingContext filterContext)
      {
          var someData = new SomeClass();
          //do stuff
          filterContext.RouteData.Values["someData"] = someData;
       }
  }
  </code></pre>
  
  <p>Action Method:</p>
  
  <pre><code>[SomeFilter]
  public ViewResult SomeActionMethod(SomeClass someData)
  {
    //someData is null here
  }
  </code></pre>
  
  <p>Please note that the following line inside my action method does return something the data saved into it in action filter:</p>
  
  <pre><code>SomeClass isNotNull = RouteData.Values["someData"] as SomeClass;
  </code></pre>
  
  <p>Anyone knows why?</p>