multiplecallers.aspx 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <%@ Page Language="C#" %>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head id="Head1" runat="server">
  5. <style type="text/css">
  6. body { font: 11pt Trebuchet MS;
  7. font-color: #000000;
  8. padding-top: 72px;
  9. text-align: center }
  10. .text { font: 8pt Trebuchet MS }
  11. </style>
  12. <title>Passing user context or method name</title>
  13. </head>
  14. <body>
  15. <form id="Form1" runat="server">
  16. <asp:ScriptManager runat="server" ID="scriptManager">
  17. <Services>
  18. <asp:ServiceReference Path="WebService.asmx" />
  19. </Services>
  20. <Scripts>
  21. <asp:ScriptReference Path="WebServiceMultipleCallers.js" />
  22. </Scripts>
  23. </asp:ScriptManager>
  24. <div>
  25. <h2>Passing User Context or Method Name</h2>
  26. <table>
  27. <tr align="left">
  28. <td>Passing user context:</td>
  29. <td>
  30. <button id="Button1"
  31. onclick="AddWithContext(10, 20, 'user context information'); return false;">User Context</button>
  32. </td>
  33. </tr>
  34. <tr align="left">
  35. <td>Passing method:</td>
  36. <td>
  37. <button id="Button7"
  38. onclick="AddWithMethod(10, 30); return false;">Method Name</button>
  39. </td>
  40. </tr>
  41. </table>
  42. </div>
  43. </form>
  44. <hr/>
  45. <div>
  46. <span id="Results"></span>
  47. </div>
  48. </body>
  49. </html>