title: Request.IsAjaxRequest returning false on POST
body: <p>My question is similar to <a href="https://stackoverflow.com/questions/1702837/request-isajaxrequest-returns-false">this one</a> and I am having a similar issue, but a big difference is that I'm using the Ajax helper methods (<code>Ajax.ActionLink</code> and <code>Ajax.BeginForm</code>) instead of handling the AJAX with jQuery. </p>
  
  <p><code>Request.IsAjaxRequest()</code> is returning true for the Edit method that accepts http GET, but false for Edit method accepting http POST. </p>
  
  <p>The GET request comes from a  link generated by:</p>
  
  <pre><code>&lt;%=Ajax.ActionLink(item.Name, "Edit", "Device",
       new { id = item.ID },
       new AjaxOptions { HttpMethod= "GET", UpdateTargetId = "ModalDialog" },
       new { name = item.Name })%&gt;
  </code></pre>
  
  <p>The POST request comes from a form generated by this code:</p>
  
  <pre><code>&lt;% using (Ajax.BeginForm("Edit", "Device", new { id = Model.ID }, new AjaxOptions { OnComplete = "CloseDialog" }))
  { %&gt;
      &lt;fieldset&gt;
           &lt;h4&gt;
              &lt;label for="Name"&gt;Name&lt;/label&gt;
          &lt;/h4&gt;
          &lt;%= Html.TextBox("Name", null, new { @class = "required" })%&gt;
  
          &lt;h4&gt;
              &lt;input type="checkbox" id="IsActive" name="IsActive" &lt;% if (Model.IsActive)%&gt; &lt;%=Html.Encode("checked=''")%&gt; /&gt;
              &lt;label for="IsActive"&gt;Unit Is Active&lt;/label&gt;
          &lt;/h4&gt;
          &lt;p&gt;
              &lt;input type="submit" value="Save" /&gt;
          &lt;/p&gt;
      &lt;/fieldset&gt;
  &lt;% } %&gt;
  </code></pre>
  
  <p>Is this by design, am I doing something wrong, and how do I fix this? </p>