Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multiple file uploads

Status
Not open for further replies.

VBRookie

Programmer
May 29, 2001
331
US

Hi,

Is there a way to upload multiple files in asp.net? I thought that there was (just add two fileupload controls right?) Well my app was working when I just had one fileupload control. When I added a second one I now get the 'document contains no data' message whenever i try to upload. If i delete the second box that error goes away.

i increased the maxrequestlength value in the web.config because i know that, that is the culprit sometimes for that error but it brought no joy ... alas the error is still alive and well.

Is this even doable or should i be trying a different route?

Many Thanks,
- VB Rookie
 
thats strange, is this probelm happening in any other system???

Known is handfull, Unknown is worldfull
 
I have the following controls on the page

Code:
<INPUT id="txtAttachment" type="file" runat="server"> 
<INPUT id="File1" type="file" name="File1" runat="server">
<asp:Button id="Button1" runat="server" Text="Button"></asp:Button>

Then I just got the information for each one and used

Code:
Me.txtAttachment.PostedFile.SaveAs(path & filename)
Me.File1.PostedFile.SaveAs(path & filename2)

I can post all of the code if you need me to.

Are you posting back anywhere after you make the selection of a file?
 
no its just not working ... it appears to be ignoring the maxrequestlength value in the web.config for some reason. If I upload smaller files it works ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top