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.
我必须在视图中填写以下模型:
IEnumerable<File> Photos IEnumerable<File> Logos IEnumerable<File> Videos
如何通过一个 POST 将多个文件发送到控制器操作?
那这个呢 :
[HttpPost] public ActionResult Post(Class Model, IEnumerable<HttpPostedFileBase> Photos, IEnumerable<HttpPostedFileBase> Logos, IEnumerable<HttpPostedFileBase> Videos) { // proceed }
照片、徽标和视频应该是你的控件的名称(输入类型文件)