473,395 Members | 1,653 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

HttpPostedFile.Filename not returning fully qualified path

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.

Sep 12 '06 #1
0 2514

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Richard L Rosenheim | last post by:
I have a recollection that somewhere in the .Net Framework are methods that will parse a fully qualified filename into its components (path, base file name, extension, etc.). Unfortunately, I'm...
4
by: Jim Garrison | last post by:
I know how to use the name() function to access the name of the current node. How do I get the 'fully qualified' name, consisting of the path from the root to the current node? I.e. <a> <b>...
3
by: Jacob Crossley | last post by:
I have two web applications on the same server: http://localhost/ModemUpgrade and http://localhost/TestFormAuth The web.config of ModemUpgrade:
0
by: Jacob Crossley | last post by:
I have two web applications on the same server: http://localhost/ModemUpgrade and http://localhost/TestFormAuth The web.config of ModemUpgrade:
4
by: | last post by:
Hi! It seems the HttpPostedFile object can't save a file to a destination withing the web's structure. I want to upload pictures from a page and store them in a subfolder to the web folder...
1
by: terrorix | last post by:
I want to save uploaded file to disk. I have this construction: HttpPostedFile myFile = ((HttpRequest)Request).Files; if (myFile != null) { string fn =...
4
by: Jim Carlock | last post by:
function CreateMyDataBaseFile($FQFN, $UID, $PW) { $db = "sqlite:" . $FQFN; $sql = "CREATE TABLE Customers(name1 TEXT, name2 TEXT);"; $dbh = new PDO($db, $UID, $PW); $dbh->exec($sql); $dbh =...
1
by: mcarrera00 | last post by:
Hi, I have a problem with uploading files to a webserver. Here it's the code Dim strPath As String = MapPath(fileName).ToLower strPath = strPath.Replace("\usercntrls", "\uploads") ...
4
by: macap.usenet | last post by:
Hello, I´ve a strange problem with my HttpPostedFile object. I coded a File Upload where the user can upload a zip file. My code looks like this: HttpFileCollection files =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.