Groups | Blog | Home
all groups > asp.net building controls > may 2005 >

asp.net building controls : HTMLInputFile Control Question


Corey Erkes
5/27/2005 3:13:11 PM
I am using ASP.Net with C# as the code behind and am trying to upload
multiple files with the HTMLInputFile Control. I am able to browse, select
a file, and finally upload, but only one file at a time. Is there a way to
select multiple files to upload at one time using this control, or possibly
another control?? Any ideas on this would be greatly appreciated!!

Thank a lot!

Corey

Brock Allen
5/30/2005 6:48:34 AM
The HTML <input type=file> only allows one file upload at a time. I've not
tried this myself, but one idea would be to write javascript to dynamically
add new <input type=file> once the user has filled in the first one. Then
on the server you'd need to dynamically add new HtmlInputFile controls to
receive the uploaded files. Perhaps then a <input type=hidden> to send up
to the server how many <input type=file> elements were added dynamically.

-Brock
DevelopMentor
http://staff.develop.com/ballen



[quoted text, click to view]


Corey Erkes
5/31/2005 7:09:21 AM
Thanks Brock, I will look into doing something like that.

Corey


[quoted text, click to view]

AddThis Social Bookmark Button