F
Frank Perugini
Hello All,
I have an HTML document stored in a database field and wish to load
and manipulate it with inline C# code like the following:
WebBrowser webControl = new WebBrowser();
webControl.DocumentText = htmlstringfromdb;
//Need to wait for DocumentCompleted event to be sure page is loaded.
HtmlDocument doc = webControl.Document;
string test = doc.Body.ToString();
The problem is that as indicated in the comment line above, it appears
if you try to set the DocumentText property of the WebBrowser control
with HTML, you need to wait for the DocumentCompleted event to be sure
it's loaded before trying to access the elements.
Does anyone know any way to wait for the document to load inline?
-Frank
I have an HTML document stored in a database field and wish to load
and manipulate it with inline C# code like the following:
WebBrowser webControl = new WebBrowser();
webControl.DocumentText = htmlstringfromdb;
//Need to wait for DocumentCompleted event to be sure page is loaded.
HtmlDocument doc = webControl.Document;
string test = doc.Body.ToString();
The problem is that as indicated in the comment line above, it appears
if you try to set the DocumentText property of the WebBrowser control
with HTML, you need to wait for the DocumentCompleted event to be sure
it's loaded before trying to access the elements.
Does anyone know any way to wait for the document to load inline?
-Frank