Calling a C# method with jquery

后端 未结 5 1531
旧时难觅i
旧时难觅i 2021-02-09 18:00

I am trying to call a method with jQuery on a button click.This is waht I have so far:

$(\"a.AddToCart\").click(function () {
            var link =         


        
5条回答
  •  情书的邮戳
    2021-02-09 18:55

    $(document).ready(function () {
    
        $.ajax({
    
            url: "Testajax.aspx/GetDate",
            data: "f=GetDate",
            cache: false,
            success: function (content) {
                $('#tableData').append('My Dear Friend');
                alert(content);
    
            },
            failure: function (response) {
                alert("no data found");
            }
    
    
        });
    });
    

提交回复
热议问题