WebServiceMethodError.aspx 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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>Handling Web Service Error</title>
  13. </head>
  14. <body>
  15. <form id="Form1" runat="server">
  16. <asp:ScriptManager runat="server" ID="scriptManagerId">
  17. <Scripts>
  18. <asp:ScriptReference Path="WebServiceMethodError.js" />
  19. </Scripts>
  20. <Services>
  21. <asp:ServiceReference Path="WebService.asmx" />
  22. </Services>
  23. </asp:ScriptManager>
  24. <div>
  25. <h2>Handling Web Service Error</h2>
  26. <table>
  27. <tr align="left">
  28. <td>Method with error:</td>
  29. <td>
  30. <!-- Cause divide by zero failure. -->
  31. <button id="Button1"
  32. onclick="Div(10, 0); return false;">Div Error</button>
  33. </td>
  34. </tr>
  35. </table>
  36. </div>
  37. </form>
  38. <hr/>
  39. <div>
  40. <span id="Results"></span>
  41. </div>
  42. </body>
  43. </html>