Calling C# function through Javascript (without Json)

前端 未结 3 1882
走了就别回头了
走了就别回头了 2021-01-14 06:19

I have a function named \"callfunction()\" in JavaScript(Mypage.aspx) .This function should call another function \"func()\" in C# (Mypage.aspx.cs )

Something like

3条回答
  •  渐次进展
    2021-01-14 06:58

    below are the options available to you

    1. If your using asp.net then use Ajax tools to create this

    2. if you don’t want to user Ajax toolkit use JavaScript __doPostBack

    3. or other option write server side function in the web service and call web method using JavaScript

提交回复
热议问题