Download string from a website using the WebClient : WebClient : Network C# Examples


C# Examples » Network » WebClient »

 

Download string from a website using the WebClient









    
using  System;
using  System.IO;
using  System.Net;
using  System.Text.RegularExpressions;

class  MainClass
{
        private  static  void  Main()  
        {
                string  remoteUri  =  "http://www.navioo.com";
                
                WebClient  client  =  new  WebClient();

                Console.WriteLine("Downloading  {0}",  remoteUri);

                string  str  =  client.DownloadString(remoteUri);

                Console.WriteLine(str);
        }
}
    
   
  
   



Output

Downloading http://www.navioo.com


     Java examples (example source code) Organized by topic 
...
...


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Network
» WebClient