I have checked various answer for this, but none of them works for me, my code in .cshtml is as follows:
try this one:
var fileCount = Request.Files.Count; if (fileCount > 0) { for (int i = 0; i < (fileCount); i++) { HttpPostedFileBase Yourfile= Request.Files[i] as HttpPostedFileBase; // do whatever with your file } }