2 duo0729 duo0729 于 2013.12.20 17:01 提问

FileUpload.SaveAs() 提示 无法访问已关闭的文件。 System.ObjectDisposedException:

FileUpload FileUp = (FileUpload)Session["FileUploadPath"];
string path = ConfigurationManager.AppSettings["InputFilePath"];
if (!Directory.Exists(path))
{
Directory.CreateDirectory(path);
}
string filename = DateTime.Now.ToString("ddHHmmss") + "_" + FileUp.FileName;
string serverFile = path + filename;
FileUp.SaveAs(serverFile);

1个回答

wangyaninglm
wangyaninglm   Ds   Rxr 2015.01.19 11:56
Csdn user default icon
上传中...
上传图片
插入图片