I'm trying to upload multiple files using
<input id="testUpload" type="file" multiple="true"/>
(yes, i know it doesn't work on IE). But my question is what should i do after that in the code to iterate through each file and upload it ?
I'm trying
foreach(HttpPostedFile file in Request.Files["testUpload"]){
}
But i get
foreach statement cannot operate on variables of type 'System.Web.HttpPostedFile' because 'System.Web.HttpPostedFile' does not contain a public definition for 'GetEnumerator'
I know i can just do for multiple = "false" :
HttpPostedFile file = Request.Files["testUpload"];
And then do operation on that file. But what if i'm selecting multiple files ? How to iterate though each one using foreach ?