J
jon
I was recently messing around with WebClient, and was using the following code:
Try
Dim wc As New System.Net.WebClient
Dim strHTML As String = ""
strHTML = wc.DownloadString("http://www.yahoo.com")
TextBox1.Text = strHTML
Catch
MsgBox(Err.Description)
End Try
to download the webpage html and such. Tried it on yahoo, google, and some others.
But when I tried http://www.youtube.com it came back with a
"The remote server returned an error: (400) Bad Request." error.
Why did it give the error instead of returning the html? How would you get the html of
a page like that?
Try
Dim wc As New System.Net.WebClient
Dim strHTML As String = ""
strHTML = wc.DownloadString("http://www.yahoo.com")
TextBox1.Text = strHTML
Catch
MsgBox(Err.Description)
End Try
to download the webpage html and such. Tried it on yahoo, google, and some others.
But when I tried http://www.youtube.com it came back with a
"The remote server returned an error: (400) Bad Request." error.
Why did it give the error instead of returning the html? How would you get the html of
a page like that?