simple question: I have an file online (txt). How to read it and check if its there? (C#.net 2.0)
See Question&Answers more detail:ossimple question: I have an file online (txt). How to read it and check if its there? (C#.net 2.0)
See Question&Answers more detail:osI think the WebClient-class is appropriate for that:
WebClient client = new WebClient();
Stream stream = client.OpenRead("http://yoururl/test.txt");
StreamReader reader = new StreamReader(stream);
String content = reader.ReadToEnd();
http://msdn.microsoft.com/en-us/library/system.net.webclient.openread.aspx