Call ASP.NET function from JavaScript?

后端 未结 20 1933
暗喜
暗喜 2020-11-22 07:21

I\'m writing a web page in ASP.NET. I have some JavaScript code, and I have a submit button with a click event.

Is it possible to call a method I created in ASP with

相关标签:
20条回答
  • 2020-11-22 08:25

    You can use PageMethods.Your C# method Name in order to access C# methods or VB.NET methods into JavaScript.

    0 讨论(0)
  • 2020-11-22 08:26

    You can do it asynchronously using .NET Ajax PageMethods. See here or here.

    0 讨论(0)
提交回复
热议问题