title: Creating a custom anchor tag helper with hash string support
body: <p>I'm trying to create a custom ASP.NET Core tag helper for <code>a</code> tag that supports <code>asp-hash</code> attribute. What that attribute is supposed to do is just append the provided value to the end of the <code>href</code> attribute.</p>
  
  <p><code>&lt;a asp-controller="Home" asp-action="Index" asp-hash="mainDiv"&gt;some link&lt;/a&gt;</code></p>
  
  <p>would then generate:</p>
  
  <p><code>&lt;a href="http://localhost/home/index#mainDiv"&gt;some link&lt;/a&gt;</code></p>
  
  <p>I found the source code for <code>AnchorTagHelper</code> in this section in <a href="https://github.com/aspnet/Mvc/blob/dev/src/Microsoft.AspNetCore.Mvc.TagHelpers/AnchorTagHelper.cs" rel="noreferrer">asp.net github repo</a> but <strong>I can't find a way to append stuff to the end of generated <code>href</code></strong>.</p>