473,385 Members | 1,353 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Automatic updating an ASPX page

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
Nov 19 '05 #1
4 1219
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.

--
Scott
http://www.OdeToCode.com/blogs/scott/

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


Nov 19 '05 #2
> 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


Nov 19 '05 #3
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
"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:62**********************@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

Nov 19 '05 #4
> 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.

-Brock
DevelopMentor
http://staff.develop.com/ballen

Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Trygve Lorentzen | last post by:
Hi, I'm developing an app with automatic version checking and updating. It must also track what version is installed for each customer in our customer database. I have made a small client to...
8
by: TC | last post by:
Hello, I am making an asynchronous call to a webservice and trying to update the web page with the results. The page is not updating. Does anybody know why??? Below is my code:
29
by: Natan | last post by:
When you create and aspx page, this is generated by default: using System; using System.Collections; using System.Collections.Specialized; using System.Configuration; using System.Text; using...
4
by: Winshent | last post by:
I am having problems with adding items to my shopping cart. The problem occures when adding items that already exists in the cart. When a user adds to cart, they are automatically redirected to...
10
by: sqlboy2000 | last post by:
Hello all, I have something very simple going on here and I'm scratching my head as to what the problem is. There are 4 items in my project, 2 webforms, a user control, and a module: ...
7
by: Ben R. | last post by:
How does automatic type casting happen in vb.net? I notice that databinder.eval "uses reflectoin" to find out the type it's dealing with. Does vb.net do the same thing behind the scenes when an...
9
by: Kevin Blount | last post by:
Here's the code I tried, and found it failed... <form runat="server" method="post" name="CreditCardForm" id="CreditCardForm"> <% foreach (object item in Request.Form) { if...
3
by: =?Utf-8?B?QnJhbmRvbg==?= | last post by:
Hi, I have an aspx page that has the "include" code in it which includes another page that displays information. I also have an upload page that allows users to upload a simple html document...
2
by: =?Utf-8?B?TUNN?= | last post by:
I have an asp.net page that contains an update panel. Within the update panel, controls get added dynamically. During partial page post backs the controls within the panel will change. I have a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.