superstar
superstar

Reputation: 1832

File Upload multiple files in asp.net (similar to gmail)

I need suggestions with regards to the multiple file upload using File Upload control in asp.net(along with C#).

I have a File Upload Control, so i click the 'Browse' button and when i select a file from the select file dialog, i want the file to be shown as a link below the File Upload Control( somewhat similar to gmail). This file should be seen such a way that it can be deleted, if i wanted to. And also i should be able to upload another file from the File Upload control. All these files should be uploaded to a location when i use a button click event in the end.

I think i have made myself clear. Any Suggestions are really helpful. Thanks.

Upvotes: 0

Views: 3445

Answers (1)

Fyodor Soikin
Fyodor Soikin

Reputation: 80744

After the user selects file, use client javascript to:

  1. Hide the file upload control
  2. Create a link in its place
  3. Create a "delete" link next to it, which will a) remove the original upload control from the page and b) remove both links created in steps 2 and 3
  4. Create a new file upload control and place it above the link created in step 2

If you have any questions left, I will try to answer.

Upvotes: 2

Related Questions