Link to home
Start Free TrialLog in
Avatar of CipherIS
CipherISFlag for United States of America

asked on

ASP.NET 2.0 - Get PathName From File Upload Control

I am utilizing a file upload control.  I know that you can obtain the FileName (c:\directoryA\DirectoryB\FileA.doc) utilizing:  FileUpload.FileName.  The result would return "FileA.doc".

But I need to actual path.  How do I get "c:\directoryA\DirectoryB\"?


Avatar of TheMegaLoser
TheMegaLoser
Flag of Sweden image

If I'm not mistaken FileUpload.PostedFile.FileName shoudl do the trick.
Avatar of nsanga
nsanga

I don't think it is possible to get the actual path.......ASP.NET is not exposing that path this is because it is a web application and file path at client machine is not relevant at sever which is a different machine.......

by the way why do you need it...........
ASKER CERTIFIED SOLUTION
Avatar of TheMegaLoser
TheMegaLoser
Flag of Sweden image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial