title: Creating a Web Navigation Helper Class for MVC
body: <p>Im a newbie to MVC and trying to use the web navigator class in my MVC application. <a href="http://polymorphicpodcast.com/shows/webnavigator/" rel="nofollow noreferrer">http://polymorphicpodcast.com/shows/webnavigator/</a>
  The class enables us to have stongly typed urls in a central class file.  </p>
  
  <p>I have 3 questions:</p>
  
  <ol>
  <li><p>Is this the best way of storing
  strongly typed urls in MVC or does<br>
  MVC has some special helper methods
  which does the same thing. </p></li>
  <li><p>What is the best place for the class
      file to go in e.g VIEW/MODEL or<br>
      CONTROLLER</p></li>
  <li><p>Below is a sample of the Navigation
          class which returns a proper url for
          an image file.
              Instead of passing the UrlHelper object to the I want to
      run this
          class in the System.Web.Mvc.ViewPage
          context (current context).  What is
          the best way of doing this.</p></li>
  </ol>
  
  <p><strong>Sample navigator class for images:</strong></p>
  
  <pre><code>using System.Web;
  using System.Web.Mvc;
  
  public class IMG
  {
      public string AjaxLoading(UrlHelper urlHelper)
      {
          return urlHelper.Content("~/Images/loading2.gif");
      }
  }
  </code></pre>