Automatic updating an ASPX page

T

t@t

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
 
S

Scott Allen

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.
 
B

Brock Allen

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.
 
R

RAK

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
 
B

Brock Allen

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...

Yes, but it's no different -- the code in the browser has to poll the server.
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top