1。  发起端:
 WebClient myWebClient = new WebClient();
   string path = Request.Url.ToString();
   path = path.Substring(0,path.LastIndexOf(@"/")+1);
   path = path + @"UpLoadFile.aspx";

   byte[] responseArray = myWebClient.UploadFile(path,"POST",@"d:\MyGod.txt");
2。接受端
void Page_Load(object sender, EventArgs e)
{ foreach(string f in Request.Files.AllKeys)
   {
         HttpPostedFile file = Request.Files[f]; file.SaveAs(@"c:\" + file.FileName); 
   }
 }

相关文章:

  • 2021-08-01
  • 2021-11-19
  • 2021-08-12
  • 2022-12-23
  • 2021-09-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-24
  • 2021-06-26
  • 2021-12-11
  • 2022-12-23
  • 2021-06-26
  • 2021-12-08
  • 2021-04-03
相关资源
相似解决方案