- i have an asp page in which i write C# code for taking data from one
table and update the another table. - now i want to countinously check one level in first level if reaches
to throuseld than i want to update another table
so i use ajax timer control
the code is given
<asp:Timer ID="Timer1" runat="server" ontick="Timer1_Tick" Interval="10000" >
<!--we have to put 24*60*60*1000=86400000 milli-seconds for one day-->
</asp:Timer>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager></pre>
-
i have write c# code for updating database in timer tick event i is
working okk -
now if a user transfer from this page to another page than the timer
will not work and database will not update
what to do?
When you want to execute code on the server without involving the client, you shouldn’t use ajax or any other client triggered approach.
Start a server side timer or background thread in global.asax to do your work.