如何执行功能以按时间刷新asp.net页面(30秒) [英] How to Execute function to refresh asp.net page according to time(30 seconds)

查看:149
本文介绍了如何执行功能以按时间刷新asp.net页面(30秒)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何根据时间自动重新加载或刷新Asp.net页面

例如

什么是最好的管理方式

当用户单击asp.net按钮时,首先要执行一些代码,然后我要执行一个需要一些参数并保持执行30秒的函数. 30秒后,它将停止执行功能,并从sqlserver(db)返回数据并绑定到网格,因此仅特定区域(而不是整个页面)应该被更改


第二个例子是v好,请多告诉我1件事,因为我必须
将ajax计时器放置在更新面板的触发器中.但是
我应该在哪里放置按钮?哪个用户首先点击执行一些代码,然后调用timer_tick事件,我正在谈论该按钮? 我的意思是在内容模板中还是在triger中?

什么是管理它的最佳方法?专门针对问题1

How can we Reload or Refresh Asp.net page automatically according to time

For Example

Whats the best way to manage it

When User Click an asp.net button First some code execute then I want to execute a function which takes some paramter and keep executing for 30 seconds . After 30 seconds it stops executing function and return the data from sqlserver(db) and bind into grid so Only specific Region should get changed not whole page


Second Example is v good please tell me 1 more thing as i have to
place ajax timer in triger of update panel.but
Where should i place button ?? which user hit first to execute some code then call timer_tick event i am talking about that button ??
I mean to say in content template or in triger??

Whats the best way to manage it Specially for question no 1

推荐答案

看看这个:
http://www.asp.net/ajax/videos/how-do-i-use-the-aspnet-ajax-timer-control [彗星 [可扩展的COMET与ASP.NET结合 [
Take a look at this:
http://www.asp.net/ajax/videos/how-do-i-use-the-aspnet-ajax-timer-control[^]


You can also look at comet[^]

This may also be of interest
Scalable COMET Combined with ASP.NET[^]

Regards
Espen Harlinn


这篇关于如何执行功能以按时间刷新asp.net页面(30秒)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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