Viewing source for recipe1611cs.aspx
<%@ Page %>
<script language="C#" runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
long ticks;
ticks=DateTime.Now.Ticks-DateTime.Today.Ticks;
TimeSpan ts=new TimeSpan(ticks);
Hours.Text=ts.Hours.ToString();
Minutes.Text=ts.Minutes.ToString();
Seconds.Text=ts.Seconds.ToString();
}
</script>
<html>
<body>
<form id="form1" method="post" runat="server">
Since the start of the day
<asp:Label ID="Hours" Runat="server" />
hours,
<asp:Label ID="Minutes" Runat="server" />
minutes and
<asp:Label ID="Seconds" Runat="server" />
seconds have passed.
</form>
</body>
</html>