title: jQuery: why does $.post does a GET instead of a POST
body: <p>I'm trying to do an ajax call and populate the "Data" div with the results of the ajax call,
  but i get an error saying: "Server Error in '/' Application. The resource cannot be found. Description: HTTP 404. Requested URL: /Home/GetStuff"
  When I look with Firebug the request was a GET to /Home/GetStuff and the answer was 404 Not found. Why I doesn't do a POST as I required in the ajax call? How can I do a POST?</p>
  
  <p>I tried using $.post and got the same behavior, though I haven't checked the jquery code, I assume $.post is a wrapper around $.ajax.</p>
  
  <p>Also i tried Ajax.ActionLink and it works fine, though I would like to use jQuery and not the Microsoft's ajax js libraries. </p>
  
  <p>The code follows:</p>
  
  <p><strong>Home/TestStuff.aspx</strong></p>
  
  <pre><code>function aClick() {
      $.ajax({
          type: "POST",
          url: $("#MeFwd").href,
          data: ({ accesscode: 102, fname: "JOHN", page: 0 }),
          dataType: "html",
          success: renderData
      });
  };
  
  function renderData(data) {
      $("#Data").html(data.get_data());
  }
  
  
  &lt;div id="Data"&gt;
  &lt;/div&gt;
  &lt;div id="link"&gt;
      &lt;a href="&lt;%= Url.Action("GetStuff", "Home") %&gt;" id="MeFwd" onclick="aClick"&gt; Click Me!&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>HomeController.cs</strong></p>
  
  <pre><code>[AcceptVerbs(HttpVerbs.Post)]
  public ActionResult GetStuff(int accessCode, string fName, int? page)
  {
  
  return "&lt;table&gt;&lt;tr&gt;&lt;td&gt;Hello World!&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;";
  }
  </code></pre>