title: jquery ajax does not work in asp.net
body: <p>I'm in the middle of an asp.net webform project. I want to use jquery ajax.
  here is my code:        </p>
  
  <pre><code>     &lt;asp:Button ID="btn_comment" runat="server" CssClass="contact_btn pull-right" Text="send" OnClientClick="callajax(event)" /&gt;
  </code></pre>
  
  <p>ajax function :        </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
          function callajax(e) {
              e.preventDefault();
              $.ajax({
              type: "POST",
              url: "../Music.aspx/sendcomment",
              data: '{name: "' + $("#&lt;%=TextBox1.ClientID%&gt;").text() + '" , email:"' + $("#&lt;%=TextBox2.ClientID%&gt;").text() + '" , website: "' + $("#&lt;%=TextBox4.ClientID%&gt;").text() + '" , comment: "' + $("#&lt;%=TextBox3.ClientID%&gt;").text() + '" }',
              contentType: "application/json; charset=utf-8",
              dataType: "json",
              success: function (response) {
                  if (response.d) {
                      alert('ok');
                  }
  
              },
              failure: function (response) {
                  alert('eror');
              }
          });
          }
  &lt;/script&gt;
  </code></pre>
  
  <p>sendcomment method :        </p>
  
  <pre><code>    [WebMethod]
      public static void sendcomment(string name , string email , string website , string comment)
          {
            // do something
          }
          catch (Exception)
          {
          }
      }
  </code></pre>
  
  <p>I also add jquery file to my project but when I run the project and click on button it does not work and fire the sendcomment method.
  I also use updatepanel but it doesn't work.Can anyone help me?</p>