protected void ASPxUploadControl1_FilesUploadComplete(object sender, EventArgs e)
        {
            string path = "";
                foreach(UploadedFile uploadedFile in ASPxUploadControl1.UploadedFiles)
                {
                    if (uploadedFile.FileName!=""&&uploadedFile.IsValid)
                    {
                        string extension = Path.GetExtension(uploadedFile.FileName).ToLower();
                        string fileName = Path.GetFileNameWithoutExtension(uploadedFile.FileName);
                        string webPath = "/upload/" + fileName + extension;
                        path = Server.MapPath(".") + webPath;
                        uploadedFile.PostedFile.SaveAs(path);
                     }
                }
        }

相关文章:

  • 2021-08-04
猜你喜欢
  • 2022-12-23
  • 2022-01-05
  • 2021-12-31
  • 2021-08-23
  • 2022-12-23
  • 2021-12-12
  • 2022-12-23
相关资源
相似解决方案