SoFunction
Updated on 2025-03-04

Implement dynamic display of the current time (does not take javascript into account overhead)


<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="" Inherits="Dynamic display of real-time time._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:///TR/xhtml1/DTD/">
<html xmlns="http:///1999/xhtml" >
<head runat="server">
<title>Dynamic display of real-time time</title>
<style type="text/css">
.style1
{
height: 183px;
}
</style>
</head>
<body>
<form runat="server">
<div> <asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
</div>
<table style=" position: absolute; margin-left:200px; margin-right:200px; margin-top:100px; width:270px; height:78px; top: 15px; left: 10px;">
<tr>
<td>Dynamic display of real-time time</td>
</tr>
<tr><td class="style1"><asp:UpdatePanel ID="UpdatePanel1" runat="server" >
<ContentTemplate>
The current time is:
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
<asp:Timer ID="Timer1" runat="server" Interval="1000">
</asp:Timer>
</ContentTemplate>
</asp:UpdatePanel>
</td></tr>
</table>
</form>
</body>
</html>