title: WebMethod Not getting called from Jquery in asp.net
body: <p>I tried to make a call from jquery to asp.net webmethod.But it never get invoked from Jquery.</p>
  
  <pre><code>[WebMethod]
  public void AddProductToCart(int productid)
  {
     Response.Write(productid.ToString());
     MyShoppingCart usersShoppingCart = new MyShoppingCart();
     String cartId = usersShoppingCart.GetShoppingCartId();
     try
     {
         usersShoppingCart.AddItem(cartId, productid, 1);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
  </code></pre>
  
  <p>Jquery function</p>
  
  <pre><code>function d(t) {
          e.ajax({
          url: "productmodel.aspx/AddProductToCart",
          type: "POST",
          data: JSON.stringify(t),
          dataType: "json",
          contentType: "application/json; charset=utf-8",
          sucess: function () {
              alert("added to cart successfully");
          }
      })
  }
  </code></pre>
  
  <p>Please help me to resolve the issue.</p>