I have a number of DataList controls in the same page which I want to repopulate with new information every so often (each one in a different interval) and render independently from the rest of the page. So each one of them is placed in a different UpdatePanel. These DataLists will be filled up with information retrieved from a DB.
My initial idea was to use an AJAX timer control for each UpdatePanel and then feed each DataList in its respective Tick even handler, but AJAX timer seems not to be working with more than a Timer in the same page. So my idea now is to assign and execution interval to a javascript function (by using window.setInterval) which will call a PageMethod. Since I can not directly bind the DataList within this PageMethod, the only soluction I see is to make the PageMethod return a list of objects. In this situation the problem I find is that I don't know, in case it is possible, how to bind the DataList from the JavaScript code. Moreover, what I want to bind is a list of custom objects, not base types.
Could someone give me some advice?
Try this article although it is Ajax Repeater but you can make it to work as DataList. http://dotnetslackers.com/articles/ajax/ASPNETRepeater.aspx
No comments:
Post a Comment