Open/Write Test : WebClient : Network C# Examples


C# Examples » Network » WebClient »

 

Open/Write Test









    
using  System;
using  System.IO;
using  System.Net;

class  MainClass
{
      public  static  void  Main(string[]  argv)
      {
            WebClient  wc  =  new  WebClient();
            string  data  =  "Data  up  upload  to  server";

            Stream  strm  =  wc.OpenWrite("http://www.navioo.com");
            StreamWriter  sw  =  new  StreamWriter(strm);

            sw.WriteLine(data);
            sw.Close();
            strm.Close();
      }
}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Network
» WebClient