Call C# method in javascript function directly

后端 未结 7 580
醉梦人生
醉梦人生 2021-01-21 02:10

How to call a c# method in javascript function directly. (eg page_load method of code behind page). Please help me.

7条回答
  •  说谎
    说谎 (楼主)
    2021-01-21 02:22

    You can create an ASHX handler where the C# method you want to run is executed and then use AJAX/jQuery to call the handler.

提交回复
热议问题