HttpPostedFile.Filename not returning fully qualified path

G

Guest

I use the following code in an aspx file to read the file name which I am
uploading from the client PC onto the server;

Dim MyFileName As String
Dim MyFileColl As HttpFileCollection = Request.Files
MyFileName = MyFileColl.Item(0).FileName

or (alos tried)

Dim PostFile As System.Web.HttpPostedFile
For Each MyFile In Request.Files.AllKeys
PostFile = Request.Files(MyFile)
MyFileName = PostFile.FileName
Next MyFile


The MyFilename in both cases is simply the file name ("text.txt"). I want
the fully qualified path and name of the file ("c:\temp\text.txt") from the
client PC. The documentation says this is what I should be getting but I
don't? Does anyone know why I am not getting the fully qualified name of the
uploaded file? Thank You.
 

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
474,001
Messages
2,570,254
Members
46,850
Latest member
VMRKlaus8

Latest Threads

Top