|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Automatic updating an ASPX pageI have 2 applications, communicating with web-services. One application is an ASP.NET application. This is sometimes updated with some data by the other application by means of a web-service. The ASPX page of this ASP.NET application should always display the actual status of that data. How can I manage this the best? One option I already implemented is to add javascript to that page: 'window.setInterval' or 'window.setTimeOut' to do a postback each second to the server side. This works. However, I am afraid this polling scheme is not as efficient as possible. Are there other options to update the page? Is the IHttpAsyncHandler an option to use? To do a asynchroneous call to the application, and let the spawn pplication thread end this request when new data is received? Or will this not work? In my opinion this is a very common problem and is probably already solved many times. Waiting for your hints. Regards, RAK Hi RAK:
There is no way to push data to the client in ASP.NET unless the client has made a request - thus, polling and refreshing are the way to go, unless you want to write software to install on the client's machine that keeps an open connection to the server. Show quoteHide quote On Tue, 3 May 2005 11:02:57 +0200, "t@t" <t@t.com> wrote: >Hello, > >I have 2 applications, communicating with web-services. One application is >an ASP.NET application. This is sometimes updated with some data by the >other application by means of a web-service. > >The ASPX page of this ASP.NET application should always display the actual >status of that data. How can I manage this the best? > >One option I already implemented is to add javascript to that page: >'window.setInterval' or 'window.setTimeOut' to do a postback each second to >the server side. This works. However, I am afraid this polling scheme is not >as efficient as possible. Are there other options to update the page? > >Is the IHttpAsyncHandler an option to use? To do a asynchroneous call to the >application, and let the spawn pplication thread end this request when new >data is received? Or will this not work? > >In my opinion this is a very common problem and is probably already solved >many times. Waiting for your hints. > >Regards, > >RAK > > One option I already implemented is to add javascript to that page: This is how the infrastructure works. If you don't want to use browser based > 'window.setInterval' or 'window.setTimeOut' to do a postback each > second to the server side. This works. However, I am afraid this > polling scheme is not as efficient as possible. Are there other > options to update the page? > > In my opinion this is a very common problem and is probably already > solved many times. Waiting for your hints. apps, then you can build a desktop style app and you can then build in these sorts of asychronous notifications much easier. -Brock DevelopMentor http://staff.develop.com/ballen Hello,
Indeed, but after some googling I found that ASP.NET 2.0 provides Client Callbacks, which will provides a better and more efficient solution. However, this takes still some months... In the meantime I found also PowerWEB LiveControls for ASP.NET. They are promising! I downloaded a trial version and am able to do callbacks without reloading the whole page each time. Kind regards, RAK Show quoteHide quote "Brock Allen" <ballen@NOSPAMdevelop.com> wrote in message news:624563632507064086345952@msnews.microsoft.com... > > One option I already implemented is to add javascript to that page: > > 'window.setInterval' or 'window.setTimeOut' to do a postback each > > second to the server side. This works. However, I am afraid this > > polling scheme is not as efficient as possible. Are there other > > options to update the page? > > > > In my opinion this is a very common problem and is probably already > > solved many times. Waiting for your hints. > > This is how the infrastructure works. If you don't want to use browser based > apps, then you can build a desktop style app and you can then build in these > sorts of asychronous notifications much easier. > > -Brock > DevelopMentor > http://staff.develop.com/ballen > > > > > Indeed, but after some googling I found that ASP.NET 2.0 provides Yes, but it's no different -- the code in the browser has to poll the server. > Client Callbacks, which will provides a better and more efficient > solution. However, this takes still some months... The main difference in 2.0 is that you don't actually post the page, and thus you don't get the refresh. It's still the same underlying infrastructure. -Brock DevelopMentor http://staff.develop.com/ballen
How to get the HtmlForm element of an ASP.NET Page?
HELP! TabStrip with Multipage is not working! Listbox and multiple selection HOWTO: Bring that row back into focus ... Text Length Parser Error in TabStrip Control 2d graphics controls Text_Changed ? How to render script code at the end of Page? Confirm Delete in DataGrid |
|||||||||||||||||||||||