title: MVC Link inside a page
body: <p>I am working in a .NET project with MVC and I need to make work a link that point to a section on the same page.</p>
  
  <p>The following code works well without MVC:</p>
  
  <pre><code>&lt;a href="#section1"&gt;Section 1&lt;/a&gt;
  &lt;div id="section1"&gt;
    &lt;h1&gt;Section 1&lt;/h1&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Now this is my real URL:
  <a href="http://localhost:17338/MarketingCustomers/CleanData/1/1150119" rel="nofollow noreferrer">http://localhost:17338/MarketingCustomers/CleanData/1/1150119</a></p>
  
  <p>And I need to be able to link with a div with id=customerErrorSection so the URL should looks like:
  <a href="http://localhost:17338/MarketingCustomers/CleanData/1/1150119#customerErrorSection" rel="nofollow noreferrer">http://localhost:17338/MarketingCustomers/CleanData/1/1150119#customerErrorSection</a> </p>
  
  <p>So I need to add "#customerErrorSection" at the end of the URL.</p>
  
  <p>But the MVC routing changes the URL to
  <a href="http://localhost:17338/MarketingCustomers/CleanData/1/1150119#/customerErrorSection" rel="nofollow noreferrer">http://localhost:17338/MarketingCustomers/CleanData/1/1150119#/customerErrorSection</a>  </p>
  
  <p>I have been playing with the RouteConfig but I don't know how to create the URL I need, this is my code that isn't working:</p>
  
  <pre><code>routes.MapRoute(
                         name: "MarketingDataClean_CustomerErrorSection",
                         url: "MarketingCustomers/CleanData/{systemSourceId}/{systemSourceCustomerId}/{#customerErrorSection}",
                         defaults: new { controller = "MarketingCustomers", action = "CleanData", systemSourceId = "", systemSourceCustomerId = "" }
                     );
  </code></pre>
  
  <p>Thanks for the help!</p>