473,839 Members | 1,408 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

InputFile.Poste dFile.FileName not giving full file path

Hi,

I have a web form where it has a <input type=file id=file1> control. I
have an Upload button to upload the file. WHen I click on browse and select
one file, it is showing the full file path in the text box of File control.
But in the code behind when I try to get the FullFile path using
file1.PostedFil e.FilePath it is not giving the full path (c:\test\test.p df).
Instead it is giving only file name (test.pdf). If i try to do this on other
computer, it is giving the full path. I am not sure why it is not giving the
full path on my computer. Please let me know if you have any idea.

Thanks,

May 24 '06 #1
2 5264
The full path of the file is really superflous information that the
browser sends along, probably mostly for historical reasons. It's only
the file name that is interresting anyway.

Are you using the same browser and same version of the browser when you
are testing on the different computers?

Is there any antivirus/firewall/protection software installed on your
computer that might remove the path information from the form data?
Sridhar wrote:
Hi,

I have a web form where it has a <input type=file id=file1> control. I
have an Upload button to upload the file. WHen I click on browse and select
one file, it is showing the full file path in the text box of File control.
But in the code behind when I try to get the FullFile path using
file1.PostedFil e.FilePath it is not giving the full path (c:\test\test.p df).
Instead it is giving only file name (test.pdf). If i try to do this on other
computer, it is giving the full path. I am not sure why it is not giving the
full path on my computer. Please let me know if you have any idea.

Thanks,

May 24 '06 #2
Hi,

I think it is due to IE 7 Beta 2. I am running IE 7 Beta 2 and the other
one has IE6. Other than that, Everything is same.

Thanks,
Sridhar.

"Göran Andersson" wrote:
The full path of the file is really superflous information that the
browser sends along, probably mostly for historical reasons. It's only
the file name that is interresting anyway.

Are you using the same browser and same version of the browser when you
are testing on the different computers?

Is there any antivirus/firewall/protection software installed on your
computer that might remove the path information from the form data?
Sridhar wrote:
Hi,

I have a web form where it has a <input type=file id=file1> control. I
have an Upload button to upload the file. WHen I click on browse and select
one file, it is showing the full file path in the text box of File control.
But in the code behind when I try to get the FullFile path using
file1.PostedFil e.FilePath it is not giving the full path (c:\test\test.p df).
Instead it is giving only file name (test.pdf). If i try to do this on other
computer, it is giving the full path. I am not sure why it is not giving the
full path on my computer. Please let me know if you have any idea.

Thanks,

May 24 '06 #3

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

Similar topics

5
12489
by: Paul | last post by:
Hi, Using the code below I can extract the filename from a path but I would like to know how to get just the path too. So if the full path is "C:\A Long Time Ago\In A Galaxy\Far Far Away\SomeFilename.txt" The filename is: SomeFilename.txt The path only is: C:\A Long Time Ago\In A Galaxy\Far Far Away\ I know there's other methods of getting the filename only, path only etc.
2
2912
by: Xam | last post by:
Hello everybody Do you know of a javascript routine that can warn if there are any pre-defined invalid chars in the filename of an INPUT file box before it is submitted with the submit button. The process would be: a) User clicks the INPUT File's Browse button to select the file from their computer.
6
10509
by: Bruce Vander Werf | last post by:
Is there a method anywhere for extracting just the filename part of a full path name? --Bruce
2
50417
by: Csharper95 | last post by:
I want to get the file name and path from a SaveFileDialog (for a 'save as' operation) after the user has saved the information under a new file name (and presumably under a new path) ? I want to display the new file name and path in the Form.text Title. So how do I go about getting the info ? Heres my code:
0
2399
by: Paul Hobbs | last post by:
Hi All, I am trying to replicate the functionality of the HTML FileField control. I can use it just fine to prompt a user to browse to a file, and it retrieves the full path just fine. I can then get the file path string by using control.value, and write it to the database. I don't want to actually do anything with the file. What I can't do is programmatically set the value of the FileField control - all the reading I have done says that...
1
2973
by: Jgold7 | last post by:
Don't know if this is in the right group, but here goes: I am working with a website that I am selecting files to be uploaded on one page (ex. UploadAttachment.aspx) and I need to retrieve those file on another page (ex. SubmitPage.aspx) and send them to an Imaging application called ImageRight. I was hoping that I could grab the PostedFiles from the UploadAttachment page, add them to an ArrayList, then send that ArrayList into Session,...
1
1901
by: Hadar | last post by:
Hi, I'm trying to upload files and to use the revision number field of the file. By using PostedFile.SaveAs the files are uploaded. The problem is that the summary tab and the revision number are deleted. Is this behavior is "by design" or it is just a bug? Thanks, Hadar
3
1145
by: smay | last post by:
I'm building a small app that is launched by right-clicking on an XML file and choosing "Open With...". Ugly, I know, but I can't associate .xml with my app. Anyway, once the app is launched, how can I get the full path to the XML file that was opened?
3
4871
by: =?Utf-8?B?RGV2b24=?= | last post by:
Is it possible to retrieve a proper/invariant file or directory name using a lowercase full path string without having to resort to a call to GetDirectories()/GetFiles() using the directory/filename as the search string? While Path, FileInfo, and DirectoryInfo all store the path information, they use the path case passed to them, so passing a lowercase path to Path.GetFullPath() will return a lowercase full path. TIA
0
9855
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9697
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10908
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10648
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10293
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9426
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5682
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4484
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3134
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.