Call ASP.NET function from JavaScript?

后端 未结 20 2333
暗喜
暗喜 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:09

    The simplest and best way to achieve this is to use the onmouseup() JavaScript event rather than onclick()

    That way you will fire JavaScript after you click and it won't interfere with the ASP OnClick() event.

提交回复
热议问题