// uploader.cs using System; using System.Net; using System.Text; public class Uploader { static void Main() { string url = "http://localhost/upload.aspx"; string file = "c:\\test.jpg"; WebClient wc = new WebClient(); byte[] ret = wc.UploadFile(url, file); string result = Encoding.ASCII.GetString(ret); Console.WriteLine(result); wc.Dispose(); } } // コンパイル方法:csc uploader.cs