sonal malhotra

sonal malhotra

  • 1.5k
  • 351
  • 6.6k

.getstudid(id, getstudidSucessCallback); is not function js

Apr 29 2019 5:51 AM
hi, how to solve these issue . i tried to find solution but it does not work
 
here is code below
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebFormstude.aspx.cs" Inherits="webservicesstudent.WebFormstude" %>  
  2. <!DOCTYPE html>  
  3. <html xmlns="http://www.w3.org/1999/xhtml">  
  4. <head runat="server">  
  5. <script type ="text/javascript">  
  6. function getstudid() {  
  7. debugger  
  8. var id = document.getElementById("txtid").value;  
  9. webservicesstudent.webservicesstudent.getstudid(id, getstudidSucessCallback);  
  10. }  
  11. function getstudidSucessCallback(results)  
  12. {  
  13. debugger  
  14. document.getElementById("txtname").value = results["Name"];  
  15. document.getElementById("txtgender").value = results["gender"];  
  16. document.getElementById("txtmarks").value = results["totalMarks"];  
  17. }  
  18. </script>  
  19. <title></title>  
  20. </head>  
  21. <body>  
  22. <form id="form1" runat="server">  
  23. <asp:ScriptManager ID="ScriptManager1" runat="server">  
  24. <Services>  
  25. <asp:ServiceReference Path="~/webservicesstudent.asmx" />  
  26. </Services>  
  27. </asp:ScriptManager>  
  28. <table>  
  29. <tr>  
  30. <td> Id:  
  31. </td>  
  32. <td>  
  33. <asp:textbox ID ="txtid" runat="server"></asp:textbox>  
  34. <input id="Button1" type="button" value="Getstudent" onclick="getstudid()" />  
  35. </td>  
  36. </tr>  
  37. <tr>  
  38. <td> Name:  
  39. </td>  
  40. <td>  
  41. <asp:textbox Id ="txtname" runat="server"></asp:textbox>  
  42. </td>  
  43. </tr>  
  44. <tr>  
  45. <td> Gender:  
  46. </td>  
  47. <td>  
  48. <asp:textbox ID ="txtgender" runat="server"></asp:textbox>  
  49. </td>  
  50. </tr>  
  51. <tr>  
  52. <td> Marks:  
  53. </td>  
  54. <td>  
  55. <asp:textbox ID="txtmarks" runat="server"></asp:textbox>  
  56. </td>  
  57. </tr>  
  58. </table>  
  59. </form>  
  60. </body>  
  61. </html>  
..please share idea

Answers (1)