By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,625 Members | 1,283 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,625 IT Pros & Developers. It's quick & easy.

please, please help - can't access HTTPFileCollection

P: n/a

i am having probs accessing the HttpFileCollection.
the count/length is always zero. the file upload parameters passed to
the page
that should be getting the httpfilecollection looks like this.

uploadprogress.aspx?&video_2=C%3A%5CDocuments%20an d%20Settings%
iTunes%5CiTunes%20Music%5CJarabe%20De%20Palo%5CLa% 20Flaca%5C
01%20Quiero%20Ser%20Poeta.m4a&video_1=C%3A%5CDocum ents%20and
%20Music%5CiTunes%5CiTunes%20Music%5CJarabe%20De%2 0Palo%5CL
a%20Flaca%5C04%20La%20Flaca.m4a&video_0=C%3A%5CDoc uments%20
My%20Music%5CiTunes%5CiTunes%20Music%5CJarabe%20De %20Palo%5

but, when i iterate though the httpfilecollection, i always get a
length = 0 and, hence, myfiles.Count = 0.

this is an upload using javascript (not the asp:fileupload tool)
from the referring page and through a hidden iframe - could that be
messing things up?

below is the server code that (is supposed to) iterate through the

help "much" appreciated at this point.

'get the form file collection
Dim myfiles As System.Web.HttpFileCollection =
Dim iFile As Integer

For iFile = 0 To myfiles.Count - 1

'get the posted file
Dim postedFile As System.Web.HttpPostedFile =

'make sure it is not blank
If Not postedFile.FileName.Equals("") Then

'Upload a file the FTP server.

ftpClient.UploadFile(System.IO.Path.GetFileName(po stedFile.FileName))

End If

Next iFile

Dec 13 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.