Reputation: 15
So, I've been saving a .txt file from a website and using...
My.Computer.FileSystem.ReadAllText()
To put it into a string. But I figured it'd be more efficient to just grab it directly. How do I go about this?
Thank you.
Upvotes: 1
Views: 1308
Reputation: 888107
You need to use the WebClient class:
Using wc As New WebClient()
myString = wc.DownloadString(someUrl)
End Using
Upvotes: 2