title: ASP.NET calling non-static webmethod from JS AJAX
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1360253/call-non-static-method-in-server-sideaspx-cs-from-client-side-use-javascript">Call non-static method in server side(aspx.cs) from client side use javascript (aspx)</a>  </p>
  </blockquote>
  
  
  
  <p>I have this following code that is working fine</p>
  
  <pre><code>function getFooObj() {
      $.ajax({
          type: "POST",
          url: "Dummy.aspx/GetFooObj",
          contentType: "application/json; charset=utf-8",
          dataType: "json",
          success: function (result) {
             alert('good');
          }
      });
  }
  
  [WebMethod]
  public static FooObj GetFooObj ()
  {
      // some code that returns FooObj 
  }
  </code></pre>
  
  <p>my question is if i want my WebMethod NOT to be static, 
  how can i call it from JS?</p>
  
  <pre><code>[WebMethod]
  public FooObj GetFooObj ()
  {
      // some code that returns FooObj 
  }
  </code></pre>