title: MVC6 attribute routing with two parameters
body: <p>I've had a look around for this and nothing that pertains to the MVC6 taghelper anchor tag in relation to having an alternative [HttpGet] method that caters for multiple parameters.</p>
  
  <p>Sure you can add multiple parameters to a MVC6 anchor taghelper but how do you process the second option with two parameters using attrubute routing...</p>
  
  <p>I have two [HttpGet] IactionResult methods:</p>
  
  <pre><code>    //GET: UserAdmin
      public async Task&lt;IActionResult&gt; Index()
      {
          return View(await _userAdminService.GetAllUsers("name_desc", false));
      }
  
  
      // GET: UserAdmin/name_desc/True
      [HttpGet("Index/{sortValue}&amp;{showDeactivated}")]
      public async Task&lt;IActionResult&gt; Index(string sortValue, bool showDeactivated)
      {
          return View(await _userAdminService.GetAllUsers(sortValue, showDeactivated));
      }
  </code></pre>
  
  <p>I have in my view an attempt to go to the second method:</p>
  
  <pre><code>&lt;a asp-action="Index" asp-route-sortValue="@Model.DisplayName" asp-route-showActivated="@Model.ShowDeActivated"&gt;Name: &lt;span class="glyphicon glyphicon-chevron-down"&gt;&lt;/span&gt;&lt;/a&gt;
  </code></pre>
  
  <p>which renders  to:</p>
  
  <pre><code>&lt;a href="/UserAdmin?sortValue=name showActivated=True"&gt;Name: &lt;span class="glyphicon glyphicon-chevron-down"&gt;&lt;/span&gt;&lt;/a&gt;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>    localhost.../UserAdmin?sorValue=name&amp;showActivated=True
  </code></pre>
  
  <p>IT never goes to the second method.</p>
  
  <p>What do I need to do to use the second [HttpGet] method with two parameters using the MVC6 anchor taghelper?</p>
  
  <p>EDIT</p>
  
  <p>Also how do you handle the ampersand separating the two parameters in the route attribute...</p>