Why aren't file uploads binding to my viewmodel?
问题 I'm trying to bind file uploads to a ViewModel (as demonstrated in this post). But I can't get the files to bind to the Files property on the ViewModel. Please see the code below. What am I doing wrong? (Edit for clarity - I'd like the uploads to bind to the VM, not have them as an Action parameter.) ViewModel public class PrimaryImageUploadViewModel { public PrimaryImageUploadViewModel() { } public HttpPostedFileBase[] Files { get; set; } public string Title { get; set; } } Action [HttpPost]