路径使用文件上传控件 [英] Path using File upload control
本文介绍了路径使用文件上传控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的aspx页面上有一个fileuploader(< asp:FileUpload ID =FileUpload1runat =server/>)控件。在按钮单击我想要我的文件的物理完整路径,我将在服务器上上传。如果文件在桌面上,那么它应该显示C:\Documents and Settings \Administrator \Desktop\Book1.xlsx
I am having a fileuploader(<asp:FileUpload ID="FileUpload1" runat="server" />) control on my aspx page. On button click i want the physical fullpath of my file, which i am going to upload on server. If the file is in desktop then it should show C:\Documents and Settings\Administrator\Desktop\Book1.xlsx
推荐答案
>
试试这个
Hi,
try this
string filePath = Path.GetFullPath(FileUpload1.FileName);;
请参考此链接并查看您的问题。
以下是以下链接:
使用fileupload控件确认文件的完整路径 [ ^ ]
Please refer this link and check out with your question.
Here is the link below.
get full path of file using fileupload control[^]
试试这个
string s1 = Path(FileUpload1.FileName);
希望这能帮到你
try this
string s1=Path(FileUpload1.FileName);
hope this will help you
这篇关于路径使用文件上传控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文