tags:

views:

32

answers:

1

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.

+1  A: 

You need to use the WebClient class:

Using wc As New WebClient()
    myString = wc.DownloadText(someUrl)
End Using
SLaks
I realised my answer was a bad solution a few seconds after adding the answer, you must have added your comment just seconds before I deleted it :)
ho1
17 ​​​​seconds.
SLaks