Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
FileUpload1.SaveAs()和有什么区别HttpPostedFile.SaveAs()。我知道两者都用于将文件或文件上传到 Web 服务器,但我想知道更多。
FileUpload1.SaveAs()
HttpPostedFile.SaveAs()
这就是 FileUpload 在幕后所做的
public void SaveAs(string filename) { HttpPostedFile f = PostedFile; if (f != null) { f.SaveAs(filename); } }
它只是 HttpPostedFile.SaveAs() 的包装器,所以没有区别。