title: how to extend the UrlHlper to attach a new method to it in Asp.net MVC?
body: <p>I am trying to extend the UrlHelper in asp.net Mvc but I do not know what is the issue in my code?</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using System.Web.Mvc;
  
  namespace workflow.helpers
  {
      public static class CustomUrls
      {
  
              public static string baseUrl(this UrlHelper helper)
              {
                  return String.Format("/workflow");
              }
      }
  }
  </code></pre>
  
  <p>I do not know why I can't see the new method in the Intel sense. </p>
  
  <blockquote>
    <p>Edit, Web.Config File</p>
  </blockquote>
  
  <pre><code>&lt;namespaces&gt;
    &lt;add namespace="System.Web.Mvc" /&gt;
    &lt;add namespace="System.Web.Mvc.Ajax" /&gt;
    &lt;add namespace="System.Web.Mvc.Html" /&gt;
    &lt;add namespace="System.Web.Routing" /&gt;
    &lt;add namespace="System.Web.Optimization" /&gt;
    &lt;add namespace="workflow.helpers" /&gt;
  &lt;/namespaces&gt;
  </code></pre>