title: Call controller method from action filter
body: <p>I have my base controller and action filter in the same namespace but in different classes.  I created a class inside of the base controller which requests http headers, and I would like to call that method inside of my action filter.</p>
  
  <p>If I do a simple <code>Details dtls = GetHeaders()</code> the intelliSense asks if I want to create another method <code>GetHeaders()</code> inside of the action filter.</p>
  
  <p>So my question is can I call the <code>GetHeaders()</code> method inside of the <code>BaseController</code> class directly from the action filter?  How would I do so? If not, how could I call that method?</p>
  
  <pre><code>namespace Infrastructure
  {
      public class BaseController
      {
          public Details GetHeaders()
          {
              //Get the headers
          }
      }
  
      public class MyFilterAttribute : ActionFilterAttribute
      {
          public override void OnActionExecuting(ActionExecutingContext filterContext)
          {
              base.OnActionExecuting(filterContext);
  
              //Call GetHeaders() to get Header1 data
          }
      }
  }
  </code></pre>