DeclarativeMarkupCS.aspx 1.2 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. <script runat="server">
  5. </script>
  6. <html xmlns="http://www.w3.org/1999/xhtml" >
  7. <head runat="server">
  8. <title>Example Showing Declarative Markup For Partial-Page Rendering</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="ScriptManager1"
  24. runat="server" />
  25. <asp:UpdatePanel ID="UpdatePanel1"
  26. UpdateMode="Conditional"
  27. runat="server">
  28. <ContentTemplate>
  29. UpdatePanel content refreshed at
  30. <%=DateTime.Now.ToString() %>
  31. <asp:Button ID="Button1"
  32. Text="Refresh"
  33. runat="server" />
  34. </ContentTemplate>
  35. </asp:UpdatePanel>
  36. </div>
  37. </form>
  38. </body>
  39. </html>