Hi everybody,
Having a web browser control and a HTML page being loaded in a text box, how can I find out or check whether I am getting the right information and not an "error message" or "the page cannot be displayed", etc.
Please help
Dinis
Printable View
Hi everybody,
Having a web browser control and a HTML page being loaded in a text box, how can I find out or check whether I am getting the right information and not an "error message" or "the page cannot be displayed", etc.
Please help
Dinis
To retrieve HTML Pages source:
Code:Text1.Text = WebBrowser1.Document.documentElement.innerHTML
And you can use the Instr function to check whether you get those errors.
Code:If Instr(1, Text1.text, "the page cannot be displayed") Then
Msgbox "Error"
End If