我很努力地使用ASP.NET(VB)上傳多個文件。上傳多個文件ASP.NET
下面是我的代碼,但我遇到了一個錯誤,指出:
錯誤1「PostedFiles」不是 成員「System.Web.UI.WebControls.FileUpload」。
我該如何克服這個問題?
下面是我的代碼:
For Each postedFile As HttpPostedFile In FileUpload1.PostedFiles
Dim fileName As String = Path.GetFileName(postedFile.FileName)
postedFile.SaveAs(Server.MapPath("~/Uploads/") & fileName)
Next
Label1.Text = String.Format("{0} files have been uploaded successfully.", FileUpload1.PostedFiles.Count)
哪裏是你的代碼? – BishNaboB
我想你忘了代碼 – ADyson