Re: Updating Web Form Control From Thread

From: Scott Allen (bitmask_at_[nospam)
Date: 11/04/04


Date: Wed, 03 Nov 2004 22:48:04 -0500

On 3 Nov 2004 15:48:31 -0800, jervinjustin@yahoo.com (Jervin Justin)
wrote:

>One way I can think of is to have the second thread (instead of
>updating the textBox) refresh the page when waitForReply returns. This
>way it would refresh only when the webservice returns an update. Is it
>possible to do this?

Jervin:

This is what you'll have to come to grips with conceptually:

The thread calling the web service is executing on the server. This
thread is the only thing that knows when the web service is ready with
results.

The web browser is executing on the client's computer. There is no way
for the server thread to reach out to the browser on another computer
and tell it something interesting has happened. The browser has to go
to the server and ask if anything interesting has happened.

This is what makes web applications "fun".

It's impossible to do what you want without the client going back to
the server. This isn't necessarily a full refresh (see
http://msdn.microsoft.com/msdnmag/issues/04/08/CuttingEdge/), but a
web server can only "talk" to a client when the client initiates the
request.

Making any sense?

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


Relevant Pages