title: How do I do an http post to code behind in asp.net webforms?
body: <p>How can I call a method in the code behind from a jQuery post in asp.net webforms?</p>
  
  <p>In MVC it's simple, I just do this:</p>
  
  <pre><code>$.post("/MyController/MyMethod", { data: somedata; }, function(result) { alert(result); });
  </code></pre>
  
  <p>but I can't figure how what to put for the first parameter if I wanted to call a method in the code behind in webforms... for example, if I have a method called <code>doSomething()</code> is there a way to stick some location in there so that it will call <code>doSomething()</code> and return data to the callback?</p>