How do I obtain a value of an HTML field with C#/C++ -
I try to get HTML element based on ID and display this value and return it (As string)). The problem is that it is seen as an object.
I have a HTML file containing it:
& lt; Label id = "address" text = "asdf" & gt; & Lt; / Labels & gt;
I have in my C ++ header file
html element {element = this-> webbrowser1-> Document-> GetElementById ("address"); String ^ asdf = element-> GetAttribute ("text"); Asdf back;
It creates, but when I launch the program, I get an exception "Object references are not set in an example of an object."
I can not use System :: Convert.ToString (); Either, it will not let me build with that.
Any suggestion is appreciated. Thank you.
Which row throws an exception - the first or the second one?
There are 4 or 5 places in that code that can throw that exception, and I will start by doing the job that who he is.
Comments
Post a Comment