需要FileUpload的完整路径 [英] Require Full Path from FileUpload

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

问题描述

从本地硬盘浏览文件后,它将显示文件位置的完整路径.我需要完整的路径,不仅是文件名( FileUpload1.FileName ).

After browsing a file from Local Hard Disk, it shows a full path of file Location. I require the full path, not only File Name (FileUpload1.FileName).

<asp:fileupload id="FileUpload1" runat="server" xmlns:asp="#unknown" />



即" C:/Details.doc "

我也可以使用此行来获取完整路径---



i.e. "C:/Details.doc"

I can use this line also to get the full path ---

<input id="FileImageC" runat="server" atomicselection="true" class="buttonUpload"
                            name="FileImageC" onchange="ShowImageC(this.value);" style="width: 150px" tabindex="139"
                            type="file" />

推荐答案

FileUpload控件将只为您提供文件名,因为它来自的路径在发布到服务器时没有任何意义.

您要完成什么?
The FileUpload control will only give you the filename as the path it comes from has no meaning when posted to the server.

What are you trying to accomplish?


这篇关于需要FileUpload的完整路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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