By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,165 Members | 853 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,165 IT Pros & Developers. It's quick & easy.

InputFile.PostedFile.FileName not giving full file path

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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.