Click here to Skip to main content
14,640,670 members
Rate this:
Please Sign up or sign in to vote.
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

Rate this:
Please Sign up or sign in to vote.

Solution 1

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
   

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100