Hello

I'm planning a programming project for my website.

I have a device that logs information to a database. To access this database I need to use to OLEDB client. What i want to do is, to make a graphical widget to my website that shows the info of my device. I want the widget to update every minute.

I want the widget to show a light, depending on the information at the device, like a traffic light. I'm familiar with c# and know this will do the program task, but i need something that gives me graphic to the website depending on the database, like output from methods in the c# files.

Any one that can help me out here?

Hi,

If you just want to show different light color based on the information logged into database by the device, you can just try to use <img> html tag with images for each color. Try the following steps:

  1. Display an image in <img> tag in an asp.net page. Have images for each color based on the device information.

  2. Since the information is continously updated in the database by the device, Write a method to get the latest information via web service in asp.net.

  3. Use an Ajax timer and call the web services from client script (JavaScript) in the AJAX-enabled ASP.NET Web page. Update the image link in the <Img> tag using javascript based on the informatin received from the webservice .

Check the following links to know more about calling web services from javascript asynchronously using asp.net ajax.

http://www.asp.net/ajax/documentation/live/Overview/AsynchronousLayerOverview.aspx
http://msdn.microsoft.com/en-US/library/bb515101.aspx

http://www.aspsnippets.com/Articles/Make-AJAX-Call-to-ASP.Net-Server-Side-Web-service-method-using-jQuery.aspx

If you want to dislay a more dynamic chart graph, you can try to use ASP.NET chart control. Refer the following links.

http://www.microsoft.com/en-us/download/details.aspx?id=22000
http://archive.msdn.microsoft.com/mschart

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.