日期:2014-05-18 浏览次数:20450 次
Dim Loop1 As Integer Dim TempFileName As String Dim MyFileCollection As HttpFileCollection = Request.Files For Loop1 = 0 To MyFileCollection.Count - 1 ' Create a new file name. TempFileName = "C:\TempFiles\File_" & CStr(Loop1) ' Save the file. MyFileCollection(Loop1).SaveAs(TempFileName) Next Loop1
------解决方案--------------------
//请确定你的Load文件夹存在。如果不存在先创建! if (Directory.Exists(@"D:/Load/")) { Directory.CreateDirectory(@"D:/Load/"); } //然后在保存 f.SaveAs((@"D:/Load/" +f.FileName )