-
Need a little help!
I am using axwebbrowser1 how can i detect if a page is not loaded. Um....how can i detect if the url that i wanted the browser to go to does not show up...say i know for a fact that the page is there but sometimes the browser shows the 'error page could not be found' page and i want to be able to detect that and automatically refresh the page to show it how can this be done
-
-
I think you will need to get the html from the browser control. The way you would do that *I think* is using something like:
mystring = axwebbrowser1.Document
Then you need to search the string for 'error page could not be found', if it is in there, then you know the page didn't load right.
-
thanks that is a good idea
-
Well, what I gave you before just might not be that easy...
I was just now working with it trying to get the document, and I didn't get what I wanted. After digging around, I found what I needed.
First, you need to add a reference the the mshtml library.
Then, use something like this:
IHTMLDocument2 obj = webbrowser.document
somestring = obj.innerHTML