从本地硬盘浏览文件后,它将显示文件位置的完整路径.我需要完整的路径,不仅是文件名( 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?