title: Calling a 'WebMethod' with jQuery in ASP.NET WebForms
body: <p>I've set a breakpoint in the following <code>WebMethod</code> but I'm never hitting the breakpoint.</p>
  
  <p><strong>cs:</strong></p>
  
  <pre class="lang-cs prettyprint-override"><code>[WebMethod]
  public static string search()
  {
      return "worked";
  }
  </code></pre>
  
  <p><strong>aspx:</strong></p>
  
  <pre class="lang-js prettyprint-override"><code>  function search() {
      $.ajax({
          type: "POST",
          url: "ProcessAudit/req_brws.aspx/search",
          data: "{}",
          contentType: "application/json; charset=utf-8",
          dataType: "json",
          success: function (msg) {
              alert(msg)
          }
      });
  }
  </code></pre>
  
  <pre class="lang-html prettyprint-override"><code>&lt;button id = "btnSearch" onclick = "search()" &gt;Search&lt;/button&gt;
  </code></pre>