开发者

auto partial page refresh in asp.net without UpdatePanel

I want to make auto partial page refresh in开发者_开发问答 asp.net. There is UpdatePanel but it sends too much data. So I've found that I can make a webservice and call it by the JavaScript code. But I don't know how to call webservice automatic. There are many examples showing how to call webservice by the button click event:

http://www.asp.net/ajax/videos/how-do-i-make-client-side-network-callbacks-with-aspnet-ajax

How to do this by the interval? Am I going in good direction?


Just use the setInterval function:

window.setInterval(function() {
    // code here will be called every 10 seconds
}, 10000);

To reset automatic calls you could use the clearInterval function on the id returned by the setInterval.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜