title: @Ajax.ActionLink generates URL with route parameter instead of POST body, throws jQuery exception on click
body: <p>I'm trying to render a series of buttons in a ASP.NET MVC 5 View.</p>
  
  <p>Each button should invoke an HTTP POST action in the controller, passing a <code>reportId</code> parameter as part of the POST body. The reportId is a GUID in the typical <code>{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}</code> format.</p>
  
  <p>Here is the view content which renders the buttons:</p>
  
  <pre><code>@foreach (Subscription sub in Model)
  {
      &lt;tr&gt;
          &lt;td&gt;
              @Ajax.ActionLink(
                  sub.Description,
                  "SendReport",
                  new {reportId = sub.SubscriptionID},
                  new AjaxOptions
                  {
                      Confirm = $"Email {sub.Description} report?",
                      HttpMethod = "POST",
                      LoadingElementId = "sending-" + sub.SubscriptionID,
                      UpdateTargetId = "submitstatus-" + sub.SubscriptionID
                  },
                  new { @class = "btn btn-default"})
              &lt;span id="sending-@sub.SubscriptionID" style="display: none"&gt;Sending...&lt;/span&gt;
              &lt;span id="submitstatus-@sub.SubscriptionID"&gt;&lt;/span&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
  }
  </code></pre>
  
  <p>It shouldn't be necessary to specify that the <code>AjaxOptions.HttpMethod = "POST"</code> <a href="https://msdn.microsoft.com/en-us/library/system.web.mvc.ajax.ajaxoptions.httpmethod%28v=vs.118%29.aspx?f=255&amp;MSPPError=-2147217396" rel="nofollow noreferrer">because the MSDN documentation says that POST is the default</a>, but I've included that for clarity.</p>
  
  <p>I have installed the <code>Microsoft.jQuery.Unobtrusive-Ajax</code> package version 3.2.3.
  I've added a bundle to the <code>App_Start\BundleConfig.cs</code> for the additional scripts:</p>
  
  <pre><code>        bundles.Add(new ScriptBundle("~/bundles/jqueryajax").Include(
                      "~/Scripts/jquery.unobtrusive-ajax*"));
  </code></pre>
  
  <p>And I've added the script bundle to the default <code>_Layout.cshtml</code>:</p>
  
  <pre><code>    @Scripts.Render("~/bundles/jquery")
      @Scripts.Render("~/bundles/bootstrap")
      @Scripts.Render("~/bundles/jqueryajax")
      @RenderSection("scripts", required: false)
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And I've checked that the web.config enables unobtrusive AJAX:</p>
  
  <pre><code>&lt;appSettings&gt;
    &lt;add key="webpages:Version" value="3.0.0.0" /&gt;
    &lt;add key="webpages:Enabled" value="false" /&gt;
    &lt;add key="ClientValidationEnabled" value="true" /&gt;
    &lt;add key="UnobtrusiveJavaScriptEnabled" value="true" /&gt;
  &lt;/appSettings&gt;
  </code></pre>
  
  <p>When I view the page in Internet Explorer 11, the buttons render nicely as buttons, and they do display the confirmation dialog when clicked. I believe this is functionality that the AJAX script provides, which indicates that the script is loaded correctly. </p>
  
  <p>But the button action URL includes the reportId, eg <code>/Home/SendReport?reportId=%7B86D7B9E1-1D13-4EE8-8059-7F03C17520CD%7D</code>. I was expecting the reportId to be submitted as POST body content. I was expecting that the action URL would just be the controller action e.g <code>/Home/SendReport</code>, without the reportId parameter.</p>
  
  <p>Question 1: Why is the reportId in the button URL and not just the POST body?</p>
  
  <p>Question 2: When the button is clicked, an exception is thrown inside jQuery-3.2.1.js.</p>
  
  <pre><code>Unhandled exception at line 1580, column 2 in 
  http://localhost:64690/Scripts/jquery-3.2.1.js
  
  0x800a139e - JavaScript runtime error: Syntax error, unrecognized expression: #sending-{55E625A8-1754-42AE-AD11-C1AEF10EB208}
  </code></pre>
  
  <p>I don't understand what's causing this exception. Is it because of the incorrect URI? Is there something wrong with this id value?</p>