浏览文件窗口,不上传文件 [英] Browse for file window without uploading the file
问题描述
有没有办法让选择文件对话框打开,并把该文件的位置到一个文本框而没有上传文件?
Is there a way to get the select file dialog box open and putting the location of the file into a textbox without ever uploading the file?
我在一个网页使用VB.NET ETA。通过使用ASP:文件上传标签,我可以得到文件位置
ETA I'm using VB.NET in a web page. By using the asp:fileupload tag I can get the file location
_fudFileLocation.PostedFile.FileName_
但我怎么prevent文件被上传的。我们并不需要它,只是文件位置。 (该文件是一个共享驱动器上,所以如果它是M:\\文件\\ todayslunch.pdf对人A,它是某乙是一样的。)
But how do I prevent the file from being uploaded at all. We don't need it, just the file location. (The files are on a shared drive so if it's M:\documents\todayslunch.pdf for person A, it's the same for person B.)
推荐答案
System.Web.HttpPostedFile.FileName得到客户,其中包括目录路径上的文件的全名。
System.Web.HttpPostedFile.FileName gets the fully qualified name of the file on the client which includes the directory path.
这篇关于浏览文件窗口,不上传文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!