Srinath Tiru

Srinath Tiru

  • 1.9k
  • 18
  • 201

question regarding multiple file upload

Feb 14 2018 3:12 PM
question regarding multiple file upload
i am uploading multiple files from a form which have 5 panels
2nd panel i am select 5 files to upload and the 5th panel i am submitting 
i am saving the file like below in panel 2 
ObjFileUploader1 = (FileUpload)Session["FileUpload1"];
ObjFileUploader2 = (FileUpload)Session["FileUpload2"];
ObjFileUploader3 = (FileUpload)Session["FileUpload3"];
ObjFileUploader4 = (FileUpload)Session["FileUpload4"];
ObjFileUploader5 = (FileUpload)Session["FileUpload5"];
 i need to iterate through this  ObjFileUploader objects when submitting files
  currenlty i am doing like below 
if (temp != 0 && ObjFileUploader1 != null && ObjFileUploader1.HasFile)
   upload the file to server
if (temp != 0 && ObjFileUploader1 != null && ObjFileUploader2.HasFile)
upload the file to server
i want to loop through all the  ObjFileUploader in one time 
how to do
please help me

Brought to you by:

Answers (1)