UpdatePanelNestedCS.aspx 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 id="Head1" runat="server">
  8. <title>UpdatePanelUpdateMode Example</title>
  9. <style type="text/css">
  10. div.NestedPanel
  11. {
  12. position: relative;
  13. margin: 2% 5% 2% 5%;
  14. }
  15. </style>
  16. </head>
  17. <body>
  18. <form id="form1" runat="server">
  19. <div>
  20. <asp:ScriptManager ID="ScriptManager"
  21. runat="server" />
  22. <asp:UpdatePanel ID="OuterPanel"
  23. UpdateMode="Conditional"
  24. runat="server">
  25. <ContentTemplate>
  26. <div>
  27. <fieldset>
  28. <legend>Outer Panel </legend>
  29. <br />
  30. <asp:Button ID="OPButton1"
  31. Text="Outer Panel Button"
  32. runat="server" />
  33. <br />
  34. Last updated on
  35. <%= DateTime.Now.ToString() %>
  36. <br />
  37. <br />
  38. <asp:UpdatePanel ID="NestedPanel1"
  39. UpdateMode="Conditional"
  40. runat="server">
  41. <ContentTemplate>
  42. <div class="NestedPanel">
  43. <fieldset>
  44. <legend>Nested Panel 1</legend>
  45. <br />
  46. Last updated on
  47. <%= DateTime.Now.ToString() %>
  48. <br />
  49. <asp:Button ID="NPButton1"
  50. Text="Nested Panel 1 Button"
  51. runat="server" />
  52. </fieldset>
  53. </div>
  54. </ContentTemplate>
  55. </asp:UpdatePanel>
  56. </fieldset>
  57. </div>
  58. </ContentTemplate>
  59. </asp:UpdatePanel>
  60. </div>
  61. </form>
  62. </body>
  63. </html>