javascript - How do I call a server side VB.net function from jquery in an asp.net form? -
i trying call method in server-side vb code jquery. import system.web.services ... 'my vb.net code <webmethod()> _ public shared function submitreport_click() 'this code go return nothing end function in javascript code alert being called submitreport_click not being called. <asp:scriptmanager id="scriptmanager1" runat="server" enablepagemethods="true"></asp:scriptmanager> <script type="text/javascript"> $("#<%= fileinput.clientid%>").on('filebatchselected', function (event) { alert("file input"); pagemethods.submitreport_click(); }) </script> i'd make function fires on click event , calls on web method using ajax, , use json pass relevant data. $(".clickme").click(dowebmethod); function dowebmethod () { var data = { 'name': 'jessikwa' , 'location