I'm using HtmlElement to get an HTML element by it's ID and trying to display this value and return it (as a String). The problem is that it sees it as an Object.
I have a webBrowser in the code with an HTML file that has:
<label id="Address" text="asdf"></label>
In my C++ header file I have
HtmlElement^ element = this->webBrowser1->Document->GetElementById("Address");
String^ asdf = element->GetAttribute("text");
return asdf;
This builds, but when I launch the program, I get an exception "Object reference not set to an instance of an object."
I can't use System::Convert.ToString(); either, it won't let me build with that.
Any suggestions are appreciated. Thanks.