title: Using a created extension method
body: <p>Here's the method I created:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using System.Web.Mvc;
  using System.Web.Mvc.Html;
  using MvcApplication1.Models;
  using System.Text;
  
  namespace MvcApplication1.HelperMethods
  {
      public static class NavigationalMenu
      {
          public static string MyMenu(this HtmlHelper helper)
          {
              ProyectoFinalEntities x = new ProyectoFinalEntities();
              var categories = x.Categories;
              StringBuilder stringBuilder = new StringBuilder();
              foreach (Category c in categories)
              {
                  stringBuilder.Append(helper.RouteLink(c.Name, "AuctionCategoryDetails", new { categoryName = c.Name }).ToString());
              }
  
              return stringBuilder.ToString();
          }
      }
  }
  </code></pre>
  
  <p>I was told that I could then use this extension method in my Views (right now, I'm using _layout.cshtml) by using the @Html keyword, like so:</p>
  
  <pre><code>@Html.MyMenu //doesn't appears to be in the available method selection.
  </code></pre>
  
  <p>What's the reason why I can't call this method like that? Thanks for the help.</p>