Click here to Skip to main content
15,939,794 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to get the full path name while using fileupload in asp.net


i had tried with these..

1.Fileupload1.tostring()
2.Fileupload1.FileName

the first one is showing the namespace where as the second one is showing only file name

i want to get the fullpath. what shall i do for this?
Posted

1 solution

I think there is no reason to know the full path of the file. Actually file is transferred in the Files collection. You can store it anywhere you want to. But if you look for the full path of the file, it would be the path of the client, which by no means required in the server.

If you still want to know the filepath, you may use

FileUpload.PostedFile.FileName

which will give you the full path of the file.:rose:
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900