Call ASP.NET function from JavaScript?

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

    Please try this:

    <%= Page.ClientScript.GetPostBackEventReference(ddlVoucherType, String.Empty) %>;
    

    ddlVoucherType is a control which the selected index change will call... And you can put any function on the selected index change of this control.

提交回复
热议问题