can't access C# method using jquery
<p>I am trying to call a C# method from java script ,I am new to web development and after a bit of searching decided on using jquery to do the same,the way I try to call the method is:</p>

<pre><code>$.ajax({
          type: "POST",
          url: "Default.aspx/IncrementJ",
          data: "{}",
          contentType: "application/json; charset=utf-8",
          dataType: "json",
          success: function(msg) {
            alert("success!")
          }
        });
</code></pre>

<p>here IncrementJ is my function name defined in C# which I want to call.here is the definition:</p>

<pre><code> [WebMethod]
    public static  void IncrementJ()
    {

        try
        {
            j++;
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
</code></pre>

<p>when I run my program web console throws an error "cannot locate resource incrementJ";please tell me where I am going wrong,</p>

<p>Thanks .</p>
