VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Reading a webpage HTML source with the WebBrowser control (and one line of code).

m.cap  (1 Submission)   Internet/HTML   Visual Basic 3.0   Advanced   Wed 3rd February 2021

Downloads the HTML source of a webpage using the MS WebBrowser control.

Inputs
A reference to a MS WebBrowser control

Assumes
I found many examples about how to download the HTML source of a webpage by means of the Winsock control or the Internet Transfer control, but not with the WebBrowser control. The Winsock control is too complex to me, and the Internet Transfer didn't work for me with pages larger than 5 Kb or so. I've found a one-line code that seems to work properly. I'm a sort of a newbie about this topic, so please be patient. I'm posting it just to share something that I found useful.

Returns
A string containing the HTML source of the web page

Rate Reading a webpage HTML source with the WebBrowser control (and one line of code). (16(16 Vote))
Reading a webpage HTML source with the WebBrowser control (and one line of code)..bas

Reading a webpage HTML source with the WebBrowser control (and one line of code). Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters