469,592 Members | 1,798 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,592 developers. It's quick & easy.

InputFile.PostedFile.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.PostedFile.FilePath it is not giving the full path (c:\test\test.pdf).
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 5002
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.PostedFile.FilePath it is not giving the full path (c:\test\test.pdf).
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.PostedFile.FilePath it is not giving the full path (c:\test\test.pdf).
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Paul | last post: by
6 posts views Thread by Bruce Vander Werf | last post: by
1 post views Thread by Jgold7 | last post: by
1 post views Thread by Hadar | last post: by
3 posts views Thread by smay | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.