Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Dynamically Updated Web Page


  • Please log in to reply
1 reply to this topic

#1 John Green

John Green

    New Member

  • Members
  • Pip
  • 1 posts

Posted 22 February 2012 - 10:35 PM

I am using the Netduino Plus to control a friend's chicken-coop. (Yes, a chicken-coop) I am attempting to use the network connection so that he can monitor things such as water level and temperature, as well as open and close the door. I am new to C# and HTML and having difficulty figuring out how to update items such as temperature on the web page as they change. I can place the data as into the HTML code, but I am not sure how to dynamically update the text without refreshing the whole page. I have seen some examples using java script to do this on web pages, but I am not sure how to get the data from a C# variable into the java script or if this is even a valid approach. Sorry if this seems a little basic, but I have to start learning somewhere. Thanks in advance!

#2 Nathan Baker

Nathan Baker

    Member

  • Members
  • PipPip
  • 22 posts
  • LocationWisconsin

Posted 23 February 2012 - 02:04 AM

I would suggest you check out some AJAX examples. You would need to have javascript poll the server (netduino) every few seconds to update the data. This would require a page that outputs only the relevant data in some format such as JSON, XML, CSV, etc....
Posted Image




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.