tags:

views:

33

answers:

1

i have a remote text file on http://somewhere... that i need to read into a string variable in vb.net. what is the simplest way to do this?

+1  A: 

Use the System.Net.WebClient class. In particular, the DownloadString method.

http://msdn.microsoft.com/en-us/library/system.net.webclient.downloadstring%28VS.80%29.aspx

Matt Greer
can you provide the code please
I__
It's very simple: WebClient wc = new WebClient(); string fooString = wc.DownloadString("http://www.myserver.com/foo.txt");
Matt Greer