/mcs/class/System.Web.Extensions/Test/AUT/AjaxClientApp/AjaxScriptComplete.aspx

https://github.com/iainlane/mono · ASP.NET · 55 lines · 46 code · 9 blank · 0 comment · 0 complexity · 25f447c270f7483b9be32cfde6c8edda MD5 · raw file

  1. <%@ Page Language="C#" Title="ASP.NET AJAX Script Walkthrough" %>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml">
  5. <head id="Head1" runat="server">
  6. <title="ASP.NET AJAX Script Walkthrough" />
  7. <style type="text/css">
  8. body { font: 11pt Trebuchet MS;
  9. font-color: #000000;
  10. padding-top: 72px;
  11. text-align: center }
  12. .text { font: 8pt Trebuchet MS }
  13. </style>
  14. </head>
  15. <body>
  16. <form id="Form1" runat="server">
  17. <asp:ScriptManager runat="server" ID="scriptManager">
  18. <Services>
  19. <asp:ServiceReference path="HelloWorldService.asmx" />
  20. </Services>
  21. </asp:ScriptManager>
  22. <div>
  23. Search for
  24. <input id="SearchKey" type="text" />
  25. <input id="SearchButton" type="button" value="Search"
  26. onclick="DoSearch()" />
  27. </div>
  28. </form>
  29. <hr style="width: 300px" />
  30. <div>
  31. <span id="Results"></span>
  32. </div>
  33. <script type="text/javascript">
  34. function DoSearch()
  35. {
  36. var SrchElem = document.getElementById("SearchKey");
  37. Samples.AspNet.HelloWorldService.HelloWorld(SrchElem.value, OnRequestComplete);
  38. }
  39. function OnRequestComplete(result)
  40. {
  41. var RsltElem = document.getElementById("Results");
  42. RsltElem.innerHTML = result;
  43. }
  44. </script>
  45. </body>
  46. </html>