Hi,
How do you retrieve source code for a webpage? In VB6, I could use the Internet Transfer Control and simply type:
Text1.Text = Inet1.OpenURL("http://www.google.co.uk/")
What's the equivalent in VB2005?
Printable View
Hi,
How do you retrieve source code for a webpage? In VB6, I could use the Internet Transfer Control and simply type:
Text1.Text = Inet1.OpenURL("http://www.google.co.uk/")
What's the equivalent in VB2005?
Very easy using the WebClient ClassVB Code:
Dim client As New WebClient() TextBox1.Text = client.DownloadString("http://www.vbforums.com") client.Dispose()
Hi,
I didn't have a reference to the Net namespace, originally, so the first line had to be:
Dim client As New Net.WebClient()
Thanks.
Imports System.Net at the top. forgot to mention...