472,127 Members | 1,650 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

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 5111
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 leo001 | last post: by

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.