title: How to use $.post with button onclick function and not a form?
body: <p>I would like to access my controller on an onclick. The form is postback set for another function. I know how to post if there was a form.  Is there a way to go to the controller without using a form and if so how do I do that?</p>
  
  <pre><code>&lt;% using (Html.BeginForm("OneMethod", "Home", FormMethod.Post, new { id = "formNext" })) { 
  &lt;input id="addContent" type="button" onclick="addContent(ind1, ind2)"/&gt;
  &lt;% } %&gt;
  </code></pre>
  
  <p>jquery</p>
  
  <pre><code>function(addContent(ind1, ind2) {
      //post should go to "TwoMethod" and not "OneMethod" but not sure how...
      $.post($(this).attr("action"), $(this).serialize(), function(response) {
          //code
      }, 'json');
  }
  </code></pre>