Saturday, July 23, 2011

Display data updates in real-time with AJAX - Encosia

Source


I’ve recently noticed the real-time “spy” feature popping up on more and more sites. Though it’s often a huge time waster, I can’t help but love the feature. It’s a great example of AJAX leveraged to do what it does best. It struck me that an ASP.NET AJAX implementation would be an excellent use of page methods for efficiency and __doPostBack() to trigger an UpdatePanel refresh. So, I decided to put together a proof of concept, using the ASP.NET AJAX framework.
To create a fully functional example, several things need to be done:
  • Choose a data source to “spy” on.
  • Build an interface to add rows, for testing.
  • Display that data in a row-based format.
  • Create a method to find the most recent row of data.
  • Use that method to asynchronously monitor row updates.
  • Refresh stale data when additions are detected.

No comments:

Post a Comment