Hi,
Quote:
>
I've to design a Web page which :
- give the stata of an electrical device. For instance, the state is
OFF or
ON for a light.
- allow the user to intercat with that device. Typically he should be
able
to swich on or off the light.
A windows application is already written to interact and poll the
devices. Now concerning the "polling", I intend to use RSS (but I am a
newbie in this area). Is is a good choice ? Or do I have to insert a
Timer in the Web page to periodically poll the Windows appli ?
>
Best regards
>
Oriane
>
A Timer inside the server code of the page will not work as hoped: as soon
as the request is finished, the page-instance is destroyed, so your timer
will never have the chance to "do" anything.
Furthermore, it's not easy to update the client (browser) when something
on the server changes.
What you *can* do is add this line to the <headsection of your page:
<meta http-equiv="refresh" content="5">
This will reload the page every 5 seconds, causing a new request on the server.
Test there the current value of that device and act accordingly.
Hans Kesting