WebClient.UploadData : WebClient « System.Net « C# / C Sharp by API






WebClient.UploadData

 
using System;
using System.Net;
using System.Text;

public class UploadDataTest
{
   public static void Main(string[] argv)
   {
      WebClient wc = new WebClient();

      string data = "This is the data to post";
      byte[] dataarray = Encoding.ASCII.GetBytes(data);

      wc.UploadData(argv[0], dataarray);
   }
}

   
  








Related examples in the same category

1.WebClient.BaseAddress
2.WebClient.Credentials
3.WebClient.DownloadData
4.WebClient.DownloadFile
5.WebClient.DownloadString(Uri u)
6.WebClient.Headers
7.WebClient.OpenRead(String url)
8.WebClient.OpenWrite
9.WebClient.ResponseHeaders
10.WebClient.UploadValues