Please Help: HttpFileCollection is Always Zero.

P

pbd22

hi.

i am having probs accessing the HttpFileCollection.
the count/length is always zero. i have tried getting the url
of the current form, and it checks out... looks like this:

http://www.imperialistwebsite.com/u...rator.FTP-SERVER\Desktop\maid\4088\ooTree.htm

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
mucking things up?

help very much appreciated at this point. thanks.

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

For iFile = 0 To myfiles.Count - 1

'get the posted file
Dim postedFile As System.Web.HttpPostedFile =
myfiles(iFile)

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

Upload a file from your local hard disk to the FTP site.

ftpClient.UploadFile(System.IO.Path.GetFileName(postedFile.FileName))

End If

Next iFile
 
P

pbd22

hi again.

is this question unusually hard or confusing? i am posting it all over
the interent
but nobody responds... i'd at least be interested in "why" i am not
getting a response
so i can adjust the question.

thanks?
 

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,769
Messages
2,569,582
Members
45,062
Latest member
OrderKetozenseACV

Latest Threads

Top