UpdatePanelCS.aspx 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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>UpdatePanel Example</title>
  9. <style type="text/css">
  10. body {
  11. font-family: Lucida Sans Unicode;
  12. font-size: 10pt;
  13. }
  14. button {
  15. font-family: tahoma;
  16. font-size: 8pt;
  17. }
  18. </style>
  19. </head>
  20. <body>
  21. <form id="form1" runat="server">
  22. <div>
  23. <asp:ScriptManager ID="ScriptManager"
  24. runat="server" />
  25. <asp:UpdatePanel ID="UpdatePanel1"
  26. UpdateMode="Conditional"
  27. runat="server">
  28. <ContentTemplate>
  29. <fieldset>
  30. <legend>UpdatePanel content</legend>
  31. <!-- Other content in the panel. -->
  32. <%=DateTime.Now.ToString() %>
  33. <br />
  34. <asp:Button ID="Button1"
  35. Text="Refresh Panel"
  36. runat="server" />
  37. </fieldset>
  38. </ContentTemplate>
  39. </asp:UpdatePanel>
  40. </div>
  41. </form>
  42. </body>
  43. </html>