I know how to upload with ASP.net’s FileUpload control.
What I want to do is use this jQuery Multiple File Upload Plugin to upload multiple files.
Here is exactly what it does when multiple files are selected for upload:
<input type='file class='multi MultiFile' id='MultiFile1_F3' name='file1[]' style='position: absolute; top: -3000px;'>
But I cannot figure out how to manipulate these files from asp.net. I have tried using Request.Files as the following link instructs: ASP.Net Upload of multiple files after choosing them from jQuery
That doesn’t work. I think that only works for controls marked with runat=’server’ at compile time.
Does anyone know how to do this? Maybe something in Request.Form…?
Thanks for your help!
It’s been a bit since I did that kind of thing in .NET, but once you begin cloning form inputs dynamically, I think you have to go out to Request.Form and find the submitted values manually. I wrote up the jQuery code to clone some (non-file) inputs with sequential identifiers here. As long as you have unique identifiers, you can run a loop to see if Request.Form[‘MultiFile1_F’ + counter] exists and go from there.