title: MVC3 Tutorial HtmlHelper not working
body: <p>I'm having a problem with the MVC3 MusicStore tutorial. It defines an HtmlHelper with a Truncate method. The helper looks like this:</p>
  
  <pre><code>using System.Web.Mvc;
  
  namespace MusicStore.Helpers
  {
      public class HtmlHelpers
      {
          public static string Truncate(this HtmlHelper helper, string input, int length)
          {
              if (input.Length &lt;= length)
              {
                  return input;
              }
              else
              {
                  return input.Substring(0, length) + "...";
              }
          }
      }
  }
  </code></pre>
  
  <p>In the view, I import it using <code>@using MusicStore.Helpers</code>, and then try to use it with <code>&lt;td&gt;@Html.Truncate(item.Title, 25) &lt;/td&gt;</code> </p>
  
  <p>However the compiler tells me no such method (Truncate) exists, and seems to be looking for Truncate on IEnumerable[MvcMusicStore.Models.Album] (which is my model) rather than on my HtmlHelpers class. </p>
  
  <p>(NB the square brackets above are really angled brackets in my code, couldnt escape them)</p>
  
  <p>Can anyone tell me what I'm doing wrong please? </p>