default.aspx 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <%@ Page Language="C#" %>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <script runat="server">
  5. </script>
  6. <html xmlns="http://www.w3.org/1999/xhtml" >
  7. <head runat="server">
  8. <title>Client Event Example</title>
  9. <style type="text/css">
  10. #OuterPanel { width: 600px; height: 200px; border: 2px solid blue; }
  11. #NestedPanel { width: 596px; height: 60px; border: 2px solid green;
  12. margin-left:5 px; margin-right:5px; margin-bottom:5px;}
  13. </style>
  14. </head>
  15. <body>
  16. <form id="form1" runat="server">
  17. <div>
  18. <asp:ScriptManager ID="ScriptManager1" runat="server">
  19. <Scripts>
  20. <asp:ScriptReference Path="ClientEventTest.js" />
  21. </Scripts>
  22. </asp:ScriptManager>
  23. <asp:UpdatePanel ID="OuterPanel" UpdateMode="Conditional" runat="server">
  24. <ContentTemplate>
  25. Postbacks from inside the outer panel and inner panel are
  26. asynchronous postbacks. PRM = Sys.WebForms.PageRequestManager. APP = Sys.Application.
  27. <br /><br />
  28. <asp:Button ID="OPButton1" Text="Outer Panel Button" runat="server" />
  29. Last updated on
  30. <%= DateTime.Now.ToString() %>
  31. <br /><br />
  32. <asp:UpdatePanel ID="NestedPanel" UpdateMode="Conditional" runat="server">
  33. <ContentTemplate>
  34. <asp:Button ID="NPButton1" Text="Nested Panel 1 Button" runat="server" />
  35. Last updated on
  36. <%= DateTime.Now.ToString() %>
  37. <br />
  38. </ContentTemplate>
  39. </asp:UpdatePanel>
  40. </ContentTemplate>
  41. </asp:UpdatePanel>
  42. <input type="button" onclick="Clear();" value="Clear" />
  43. <asp:Button ID="FullPostBack" runat="server" Text="Full Postback" />
  44. <a href="http://www.microsoft.com">Test Window Unload</a>
  45. <br />
  46. <span id="ClientEvents"></span>
  47. </div>
  48. </form>
  49. </body>
  50. </html>