473,395 Members | 2,192 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,395 software developers and data experts.

Controlin an electrical device through a Web page

Hi,

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

Jun 12 '07 #1
2 1038
Hi,
>
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
Jun 12 '07 #2
you want a multi-tier design. create a nt service that contains polling
code and has on, off and read commands. expose these commands as a
remoting service.

now you can create web page that call the remoting service to actually
control the light.
-- bruce (sqlwork.com)

Oriane wrote:
Hi,

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
Jun 12 '07 #3

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

Similar topics

8
by: Tony Liu | last post by:
I am having a "Null Device is Missing" compile error when compiling a c++ project. The documentation from MSDN said it could be caused by low system resource or the user account does not have...
13
by: Metallicraft | last post by:
I have a vb6 application. On the main form is a picture box with one or two images and several pieces of text displayed in it. These are created on the fly using gdi32 routines that are all in a...
5
by: Tom | last post by:
I am converting an old application that was printing directly to a specialized printer device (i.e. a special label printer). It was doing this by opening a file with the file path of 'LPT1:' and...
1
by: Uma | last post by:
Hi I am new to ASP.NET and i want to develop my personal dairy in ASP.NET. In that,i want to write personal details for particular timeings of particular date(like in yahoo calendar).How can...
1
by: Simon | last post by:
Hi I have a vs2005 and I try to put a placeholdercontent control on header tag of the master page, for adding extra header on the content page, but I still have this error when I build: "...
1
by: Luurs | last post by:
Hi All, I've been using a asp-label in the HTML <headsection for quite some time in order to dynamically generate meta-keywords,-description, css and js references. Though the actual...
8
by: Konstantin Andreev | last post by:
Hello. I'm experiencing very disagreeable problem: DB2 refuses tablespace containers, which are DEVICE's bigger than 4G. So, If I below 4G limit: | # db2 create tablespace TS1 pagesize 4096...
0
nabh4u
by: nabh4u | last post by:
i want to know how can we relate windows service with a web page. i mean i have a windows service project where i run some start thread, which calls another class and has the IPAddress and status of...
10
by: alan75 | last post by:
I'm a newbie using NET on web so please bear with me. I have developed client to interface a biometric fingerprint scanner device using the manufacturer's SDK for my company. Now I need to move...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.