Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
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 2-Feb-13 23:09pm

1 solution

Rate this: bad
good
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
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 324
1 Maciej Los 239
2 Sergey Alexandrovich Kryukov 182
3 CPallini 120
4 Richard MacCutchan 120
0 OriginalGriff 5,474
1 Sergey Alexandrovich Kryukov 4,713
2 Peter Leow 2,944
3 DamithSL 2,465
4 Maciej Los 2,434


Advertise | Privacy | Mobile
Web02 | 2.8.140718.1 | Last Updated 3 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid