Click here to Skip to main content
11,924,800 members (58,618 online)
Rate this:
Please Sign up or sign in to vote.
See more: ASP.NET4
Hi Friends ,

i am using file upload control in my project but i failed to get full path of file so anybody help me to solve this problem.
eg. required path F:\somedirectory\sub\filename.extention
Thank You.
Posted 13-Feb-12 2:44am
Edited 13-Feb-12 2:47am
manognya kota 13-Feb-12 7:46am
could you please post your code what you have tried?
Rajesh Anuhya 13-Feb-12 7:47am
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

B Birajdar 13-Feb-12 8:52am
excellent info in the link....
My 5
Rajesh Anuhya 13-Feb-12 8:57am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1



Hope it helps.
mail02nilesh 13-Feb-12 7:53am
it gives root path and i want hard drive path
Syed Salman Raza Zaidi 13-Feb-12 8:05am
try this Path.GetFullPath(FileUpload1.FileName)
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

When you are working with the FileUpload control , you dont need the full path of the file where the file comes from.

Instead on the click of "Submit" or "Upload" button, you just need to check the FileUpload1.HasFile property and then save the file to the server on any path using


The FullPath is not displayed as a security measure to avoid exposing the client's machine's folder structure or drives to the server.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.151125.3 | Last Updated 22 Oct 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100