Simulate File upload (multiple files)

T

TK

I have a file upload control to allow a user to select/upload a file
to the server. They need to upload x number of files in one shot
because they have to confirm that they are uploading x number files
for processing. So I do not want the files to be uploaded until the
user presses a submit button verifying that they want to submit x
number of files for processig (processing refers to me doing something
to the files once uploaded). Catch is that I only want one input file
control which adds the filename of the file to be uploaded to a
datagrid and only uploads all the files when the user clicks a cubmit
button.

Right now I have a datatable that is kept in viewstate that keeps
track of the files (filename and full client-path of the file to
upload) the user has added. The datatable is bound to a datagrid which
displays a delete button (to remove a file from the list of files to
upload) and the actual name of the file being uploaded.

So is there a way to accomplish this without creating a HTMLInputFile
control for every file that is to be uploaded? The datatable also
stores the full path of the file (e.g. c:\somedir\clientfile.txt) that
the user selected using the file upload browse button. I basically
need to simulate the file upload process using the filenames (with
full path) from the datatable. Is this possible or is there a
different way of accomplishing this?

Thx in advance for any help.
Tom
 
E

Eric Lawrence [MSFT]

I doubt this is possible. Without the HTMLInputFile control, the browser
isn't going to submit the file data. This is for both RFC and security
reasons.

You could write an ActiveX or WinForms control to accomplish this.


--
Thanks,

Eric Lawrence
Program Manager
Assistance and Worldwide Services

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top