We help IT Professionals succeed at work.

how to get path from FileUpload web control

dmve
dmve asked
on
Medium Priority
6,228 Views
Last Modified: 2010-04-21
On my webform I would like to use the FileUpload control to select the file to upload. The selection works fine, and the full path and filename shows in the textbox. BUT when I want to get the full name (path & filename) I can't find any variable that actually gives me this.

I would expect to find something like FileUpload1.Path when there is a FileUpload1.Filename.

Any good ideas?
Comment
Watch Question

Commented:
If you want the full path, use the following.

FileUpload1.PostedFile.FileName

Author

Commented:
Thanks, some times my brain goes on leave....  ;-)

Explore More ContentExplore courses, solutions, and other research materials related to this topic.