Calling a C# method with jquery

后端 未结 5 1539
旧时难觅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 19:01

    If this is Asp.Net webforms you will need to make the webmethod static or the method cannot be accessed through JavaScript.

提交回复
热议问题