在文件上传器控件中获取完整路径 [英] To get full path in file uploader control

查看:84
本文介绍了在文件上传器控件中获取完整路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用文件上传器控件.但是我没有获取上载文件的客户端计算机的完整路径.
所以,什么代码对我有用...

我在后面使用代码,例如:

i am using the file uploader control. but i don1t get the full path of client machine for the uploaded file.
so ,what code is useful for me...

i use code behind like:

string path = "",file_path="";
     path = Server.MapPath("./Document Attchment/");

     if (FileUpload1.HasFile)
     {
         file_path = FileUpload1.filename;


}

我想从客户端计算机获取完整路径


}

i wnt to get full path from the client machine

推荐答案

您不能.

出于安全原因,完整路径不可用(这将毫无意义,因为客户端根本不必是PC,因此不必具有您会这样识别的路径")
You can''t.

The full path is not available for security reasons (and it would be meaningless, since the client does not have to be a PC at all, and thus doesn''t have to have a "path" your would recognise as such)


这篇关于在文件上传器控件中获取完整路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆