Click here to Skip to main content
16,021,293 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have been given a requirement wherein the user should be provided with an option to add multiple files to the Grid view and the same should be uploaded to the server all at once. There should be an option to remove one or more files that are being requested using HTTP.

I used a single 'FileUpload' control and was able to upload a text file to the directory. Please advise should multiple File Upload controls be placed in the web page to achieve the above requirement or a single File Upload control can do..

Also, How to retain the requested files in the HTTPFileCollection object even after postback?


Thanks in advance,
Priya
Posted

1 solution

Quote:
should multiple File Upload controls be placed in the web page to achieve the above requirement
YES

You can or course set them at a static number in advance, like having 3 FileUpload elements, OR (and far nicer if you ask me) you can create them dynamically like when the user clicks an "Add File" button, see example code[^]

Cheers,
Edo
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900