Pushing data to a webpage used to be done with a java applet running a little web server (on port 80 to get through firewalls, a problem if the client machine already has a web server running locally) that would respond to requests and update elements in the DOM. You could fake this with AJAX by having a java script timer event to poll the server for new data. Easiest way to do this could be to abandon the DataGrid and render the table or whatever on the client from (XML) data fetched by the AJAX method. Beware of the constant load from the client browsers, like thousands of users polling the server for updates. If this may be a problem depending on the potential user base the applet variant might be a better solution. In that case the server must keep track on which browser applets to send data to, with some kind of publish/subscribe-mechanism.
// Kristofer -----Original Message----- From: Discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Peter Vertes Sent: den 25 januari 2007 18:14 To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM Subject: [ADVANCED-DOTNET] Streaming Data to a Webpage Hello List, I've been presented with an interesting project but after doing some research into it I believe it is impossible to do with the requirements given by the client. The client would like to stream data to a webpage and the webpage should display the updates delivered by the data as close to real-time as possible. For instance imagine a DataGrid that has 10 ticker symbols in it. Whenever the price changes for a symbol the backend pushes the changed prices and symbols into a DataSet and the DataGrid (which is bound to the DataSet) shows the updated prices. The requirements of the client are that the users should not have to download/install anything onto their computers and no ports should be needed to be opened on the firewall besides ports 80. I've been doing some research into this but I'm not getting too far. I've tried opening a socket from ASP.NET but I can't get updates without a refresh to the page. I've looked into an AJAX solution but with AJAX you can't have an open socket. To be honest I think the only way this could be possibly done is either via a Java applet or with some ActiveX component (although I'd prefer Java over ActiveX programming). Before I told the client that besides a Java Applet solution the project could not be done I thought I'd check with the list and ask for opinions or other words of wisdom. Am I right by thinking this can only be done with a Java applet or is there another solution out there that I haven't explored ? Better yet; has anyone done anything like this before ? Thanks for all ideas/comments in advance... -Pete =================================== This list is hosted by DevelopMentor(r) http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com