How can you download a webpage/URL into a string variable in VB.net?
I had used WebClient in the past, but it is depreciated and doesn’t seem to work correctly.
What is the current method?
In the past I used
Using client As New WebClient
' Download the web page as a string.
Dim value As String = client.DownloadString("http://example.com/text.txt")
End Using
New contributor
Steve Spivey is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.