How to "push" updates to individual cells in a (ASP.NET) web page table/grid?

Posted by dommer on Stack Overflow See other posts from Stack Overflow or by dommer
Published on 2009-05-08T12:23:24Z Indexed on 2010/05/03 13:08 UTC
Read the original article Hit count: 223

I'm building something similar to a price comparison site. This will be developed in ASP.NET/WebForms/C#/.NET 3.5. The site will be used by the public, so I have no control over the client side - and the application isn't so central to their lives that they'll go out of their way to make it work.

I want to have a table/grid that displays products in rows, vendors in columns, and prices in the cells. Price updates will be arriving (at the server) continuously, and I'd like to "push" any updates to the clients' browsers - ideally only updating what has changed. So, if Vendor A changes their price on Product B, I'd want to immediately update the relevant cell in all the browsers that are viewing this information.

I don't want to use any browser plug-ins (e.g. Silverlight). Javascript is fine.

What's the best approach to take?

Presumably my options are:

1) have the client page continuously poll the server for updates, locate the correct cell and update it; or 2) have the server be able to send updates to all the open browser pages which are listening for these updates.

The first one would seem the most plausible, but I don't want to constrain the assembled wisdom of the SO community.

I'm happy to purchase any third party components (e.g. a grid) that might help with this. I already have the DevExpress grid/ajax components if they provide anything useful.

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about AJAX