I want to get full path which user selected in file upload control开发者_JS百科. how can we do it.
You can't.
The file upload will send you the file, with the filename, but nothing else. Giving you the full path on the users computer is both a possible invasion of privacy and a possible security breach, so it is not allowed.
I don't think you can do that for security reasons. This means you can get information about any user folder structure that uploads files to your web site.
Regards...
browser restrictions does not allow this, however there are some hints using javascript before submiting to achieve this
For instance
<asp:button onClientClick="document.getElementById('hiddenField1').value = document.getElementById('fileUpload1').value" ...
Then the path can be retrieved on server side via hiddenField1.Value
精彩评论