请问下各位高手用C#怎么一次性上传多张图片到服务器??我是新生~

解决方案 »

  1.   

    //result = Path.GetFileName(uploadfiles.FileName);//获得文件名   
      string fileEx = Path.GetExtension(uploadfiles.FileName);//获得文件扩展名
      saveName = "CR" +"-"+ StringHelper.GetDateTimeString() + fileEx;//实际保存文件名
      string phyPath = folder;
      if (!Directory.Exists(phyPath))
      {
      Directory.CreateDirectory(phyPath);
      }
      try
      {
      uploadfiles.SaveAs(phyPath + saveName);
      }
      catch (Exception e)
      {
      throw new ApplicationException(e.Message);
      }
    这是上传一张的  多张的也无非就是循环遍历一下uploadfiles.FileNames
    然后同理执行以上方法