Not sure if this is what you need but it may help... Create a standard ASPX Timer control with an AJAX update panel. ... <asp:ScriptManager ID="ScriptManager1" runat="server" /> <asp:Timer ID="tmrClock" runat="server" Interval="1000" OnTick="tmrClock_Tick"></asp:Timer> <asp:UpdatePanel ID="updPnlClock" UpdateMode="Conditional" runat="server"> <Triggers> <asp:AsyncPostBackTrigger ControlID="tmrClock" EventName="Tick" /> </Triggers> <ContentTemplate> <asp:Label ID="lblTime" runat="server" ForeColor="#B22222"></asp:Label> </ContentTemplate> </asp:UpdatePanel>
... Code Behind Page: Subscribe to the Tick event on the ASP Timer control. This one represents a ticking clock. protected void tmrClock_Tick(object sender, EventArgs e) { lblTime.Text = DateTime.Now.ToLongTimeString(); }
S
Slasher175
@Slasher175
Posts
-
How to set a TIMER ?