title: How can I get the current controller from within a MVC HtmlHelper extension?
body: <p>Like with most implementations of MVC, all of my abstract services are available in the Controller. Well, I am creating the following HTML helper extension to allow embedding application settings into the HTML as hidden inputs:</p>
  
  <pre><code>public static MvcHtmlString HiddenForSetting&lt;TResult&gt;(this HtmlHelper htmlHelper, Expression&lt;Func&lt;IMyAppSettings, TResult&gt;&gt; expression, string name = null)
  {
      IMyAppSettings settings = null;
  
      return MyHtmlHelpers.HiddenForSetting&lt;IMyAppSettings, TResult&gt;(htmlHelper, expression, settings, name);
  }
  </code></pre>
  
  <p>The helper provides the settings object and allows the consumer to select which property to embed. <code>IMyAppSettings</code> is such a service. So I want to get this service off of the controller itself. Is there a means of accessing the controller from within this static helper extension method?</p>
  
  <p><strong>Note: I DO NOT need the controller name! I need the controller instance itself.</strong></p>