Currently I have a website loaded in a WebBrowser component, which keeps changing stuff inside a certain <a> inside the page. In order for me to get the data, I have to create another WebRequest each 5 seconds, just to refresh the data (I think they’re called dynamic pages). I’ve tried fetching the data from the WebBrowser (WebBrowser.DocumentText), but the value just remained the same, even though I am pretty sure it changed, because I can see it changed. I think the webrequest each 5 seconds takes up unnecesary memory space, and that this can be done easier.
Do you guys maybe know a way for me to do this?
Guessing at Winforms. You’ll want to use the Document property to read back the DOM. Here’s an example. Start a new Winforms project and drop a WebBrowser on the form. Then a label and a timer. Make the code look like this:
The browser will navigate to your question. Type something in the Answer box, note how the label displays what you typed.
You’ll need to tweak this code to work with your specific web page, alter the “wmd-input” element name. Use a DOM inspection tool to find the name. I like Firebug.