I am trying to call a method with jQuery on a button click.This is waht I have so far:
jQuery
$(\"a.AddToCart\").click(function () { var link =
Add Success and error function to check your ajax functionality
... $.ajax({ type:"POST", url: "/Account/AddToCartHack", data: {url : link}, contentType: "application/json; charset=utf-8", dataType: "json", success: function(){ alert('success'); }, error:function(){ alert('error'); } }); ....