title: Use Anchor using Html.MenuLink asp.net mvc4
body: <p>I'm using Asp.net MVC4 and i'm trying to add an "anchor" in the Html.MenuLink without rewriting a new MenuLink</p>
  
  <p>Here my the html link</p>
  
  <pre><code>&lt;li class="nousjoindre"&gt;
      @Html.MenuLink("Join us", "Index", "JoinUs", null, new { @class = "active" })
  &lt;/li&gt;
  </code></pre>
  
  <p>Resulting in this html when render</p>
  
  <pre><code>&lt;li class="join"&gt;
      &lt;a href="/JoinUs"&gt;Join us&lt;/a&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p>and the target anchor</p>
  
  <pre><code>&lt;div&gt;
      &lt;h1 id="PointHere"&gt;Point here&lt;/h1&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and the MenuLink code</p>
  
  <pre><code>public static MvcHtmlString MenuLink( this HtmlHelper htmlHelper, string linkText, string actionName, string controllerName, object routeValues = null, object htmlAttributes = null) 
  {
      string currentAction = htmlHelper.ViewContext.RouteData.GetRequiredString("action");
      string currentController = htmlHelper.ViewContext.RouteData.GetRequiredString("controller");
  
      if (controllerName == currentController)
      {
          if (htmlAttributes == null) 
              htmlAttributes = new { @class = "selected" };
  
          return htmlHelper.ActionLink(
              linkText,
              actionName,
              controllerName,
              routeValues,
              htmlAttributes
          );
      }
  
      return htmlHelper.ActionLink(linkText, actionName, controllerName);
  }
  </code></pre>
  
  <p>The 4th parameter of the Html.MenuLink is used for adding parameters to the target link, but  that is not what I needed.</p>
  
  <p>I want to have an url like <code>localhost/JoinUs#PointHere</code></p>
  
  <p>Thanks for help</p>