即使转移到其他页面后也更新asp.net页面 [英] update asp.net page even after transfer to different page

查看:80
本文介绍了即使转移到其他页面后也更新asp.net页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我有一个ASP页面,在其中编写用于从一个表中获取数据并更新另一个表的C#代码.

现在我想无数次地检查一级中的一个级别,而不要更新另一个表

所以我使用ajax计时器控件

代码已给出

hello

i have a 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>



我已经在计时器滴答事件中编写了用于更新数据库的C#代码,我正在正常工作

现在,如果用户从该页面转移到另一个页面而不是计时器,则该定时器将不起作用,并且数据库将不会更新

做什么



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

推荐答案

在所有asp页面中使用母版.在主页上设置计时器代码.

玩得开心

就一个问题. 从一个表中获取数据并更新另一个表"是什么意思?Windows服务无法做到这一点吗?
Use a masterpage in all of your asp pages. Set the timer code in the masterpage.

have fun

just a question. what do you mean exactly with ''for taking data from one table and update the another table.'' Can''t a windows service do this?


这篇关于即使转移到其他页面后也更新asp.net页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆