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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top