Call C# method in javascript function directly

后端 未结 7 586
醉梦人生
醉梦人生 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:33

    Simple answer: YOU CANNOT (at least page_load specifically)! Get clear understanding about what is server-side and what is client side code.

    Other options to call server side methods is using AJAX! Read.

提交回复
热议问题