title: Including an anchor tag in an ASP.NET MVC Html.ActionLink
body: <p>In ASP.NET MVC, I'm trying to create a link that includes an anchor tag (that is, directing the user to a page, and a specific section of the page).</p>
  
  <p>The URL I am trying to create should look like the following:</p>
  
  <pre><code>&lt;a href="/category/subcategory/1#section12"&gt;Title for a section on the page&lt;/a&gt;
  </code></pre>
  
  <p>My routing is set up with the standard: </p>
  
  <pre><code>routes.MapRoute("Default", "{controller}/{action}/{categoryid}"); 
  </code></pre>
  
  <p>The action link syntax that I am using is: </p>
  
  <pre><code>&lt;%foreach (Category parent in ViewData.Model) { %&gt;
  &lt;h3&gt;&lt;%=parent.Name %&gt;&lt;/h3&gt;
  &lt;ul&gt;
  &lt;%foreach (Category child in parent.SubCategories) { %&gt;
      &lt;li&gt;&lt;%=Html.ActionLink&lt;CategoryController&gt;(x =&gt; x.Subcategory(parent.ID), child.Name) %&gt;&lt;/li&gt;
  &lt;%} %&gt;
  &lt;/ul&gt;
  &lt;%} %&gt;
  </code></pre>
  
  <p>My controller method is as follows:</p>
  
  <pre><code>public ActionResult Subcategory(int categoryID)
  {
     //return itemList
  
     return View(itemList);
  }
  </code></pre>
  
  <p>The above correctly returns a URL as follows:</p>
  
  <pre><code>&lt;a href="/category/subcategory/1"&gt;Title for a section on the page&lt;/a&gt;
  </code></pre>
  
  <p>I can't figure out how to add the <strong>#section12</strong> part. The "section" word is just the convention I am using to break up the page sections, and the 12 is the ID of the subcategory, i.e., child.ID.</p>
  
  <p>How can I do this?</p>