//上传文件
System.Net.WebClient client = new System.Net.WebClient();
client.UploadFile(" http://www.ourwebsite.com/newfile.htm","c:\\file\\demo.htm ");
//上传图片
byte[] imageData = new byte[1024];
client.UploadData(" http://www.ourwebsite.com.cn/image.jpg ", imageData);
System.Net.WebClient client = new System.Net.WebClient();
client.UploadFile(" http://www.ourwebsite.com/newfile.htm","c:\\file\\demo.htm ");
//上传图片
byte[] imageData = new byte[1024];
client.UploadData(" http://www.ourwebsite.com.cn/image.jpg ", imageData);