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
2009-12-29 18:39:59
can you provide the code please
I__
2009-12-29 18:40:55
It's very simple: WebClient wc = new WebClient(); string fooString = wc.DownloadString("http://www.myserver.com/foo.txt");
Matt Greer
2009-12-29 18:44:19