//string remoteUrl = "http://192.168.100.226/bjbcorpadmin/images";
//string formdataTemplate = "Content-Disposition: form-data; filename=\"{0}\";\r\nContent-Type: image/jpg\r\n\r\n";
//string boundary = "---------------------------" + DateTime.Now.Ticks.ToString("x");
//byte[] boundarybytes = Encoding.ASCII.GetBytes("\r\n--" + boundary + "\r\n");
//HttpWebRequest httpRequest = (HttpWebRequest)WebRequest.Create(remoteUrl);
//httpRequest.ServicePoint.Expect100Continue = false;
//httpRequest.Method = "POST";
//httpRequest.ContentType = "multipart/form-data; boundary=" + boundary;
//using (FileStream filestream = new FileStream(savePath, FileMode.Open, FileAccess.Read, FileShare.Read))
//{
// using (Stream requestStream = httpRequest.GetRequestStream())
// {
// requestStream.Write(boundarybytes, 0, boundarybytes.Length);
// string formitem = string.Format(formdataTemplate, Path.GetFileName(savePath));
// byte[] formbytes = Encoding.UTF8.GetBytes(formitem);
// requestStream.Write(formbytes, 0, formbytes.Length);
// byte[] buffer = new byte[1024 * 4];
// int bytesLeft = 0;
// while ((bytesLeft = filestream.Read(buffer, 0, buffer.Length)) > 0)
// {
// requestStream.Write(buffer, 0, bytesLeft);
// }
// filestream.CopyTo(requestStream);
// }
//}
//try
//{
// using (HttpWebResponse response = (HttpWebResponse)httpRequest.GetResponse()) { }
// Console.WriteLine("Success");
//}
//catch (Exception ex)
//{
// throw;
//}
but was error.. please help me