default.aspx 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. <html xmlns="http://www.w3.org/1999/xhtml" >
  5. <head runat="server">
  6. <title>UpdatePanel Tutorial</title>
  7. <style type="text/css">
  8. #UpdatePanel2 {
  9. position: relative;
  10. margin: 2% 5% 2% 5%;
  11. }
  12. </style>
  13. </head>
  14. <body>
  15. <form id="form1" runat="server">
  16. <div>
  17. <asp:ScriptManager id="ScriptManager1" runat="server">
  18. </asp:ScriptManager>
  19. <asp:UpdatePanel id="UpdatePanel1" UpdateMode="Conditional" runat="server">
  20. <ContentTemplate>
  21. <fieldset>
  22. <legend>Parent UpdatePanel</legend>
  23. Last refresh <%=DateTime.Now.ToString() %> <br />
  24. <asp:Button ID="Button1" runat="server" Text="Refresh Outer Panel" />
  25. <asp:UpdatePanel ID="UpdatePanel2" runat="server">
  26. <ContentTemplate>
  27. <fieldset>
  28. <legend>Nested UpdatePanel</legend>
  29. Last refresh <%=DateTime.Now.ToString() %> <br />
  30. <asp:Calendar ID="Calendar1" runat="server"></asp:Calendar>
  31. </fieldset>
  32. </ContentTemplate>
  33. </asp:UpdatePanel>
  34. </fieldset>
  35. </ContentTemplate>
  36. </asp:UpdatePanel>
  37. </div>
  38. </form>
  39. </body>
  40. </html>