在ASP.NET 2.0中,我可以使用按钮来浏览客户端文件夹并选择路径(而不是文件)吗?

时间:2021-11-06 00:29:17

I already used a hidden file upload control to browse file and grab the file path, without really uploading it.

我已经使用隐藏文件上传控件来浏览文件并获取文件路径,而不是真正上传它。

My question is, is there a way in ASP.NET, create a folder browse button, when it is clicked, just to browse client file system, and user can click the path and choose that path not file?

我的问题是,在ASP.NET中是否有一种方法,创建文件夹浏览按钮,当它被单击时,只是为了浏览客户端文件系统,用户可以单击路径并选择该路径不是文件?

3 个解决方案

#1


No, you can't do with standart ASP.NET controls which map to HTML controls. Probably it's possible if you are using Flash, Silverlight or Java applets.

不,您无法使用映射到HTML控件的标准ASP.NET控件。如果您使用Flash,Silverlight或Java applet,可能也是可能的。

#2


Unfortunately no, the only file-related HTML control is the file picker (<input type="file">).

不幸的是,唯一与文件相关的HTML控件是文件选择器()。

#3


Use Flash for this task and invoke this actions via JS

使用Flash执行此任务并通过JS调用此操作

#1


No, you can't do with standart ASP.NET controls which map to HTML controls. Probably it's possible if you are using Flash, Silverlight or Java applets.

不,您无法使用映射到HTML控件的标准ASP.NET控件。如果您使用Flash,Silverlight或Java applet,可能也是可能的。

#2


Unfortunately no, the only file-related HTML control is the file picker (<input type="file">).

不幸的是,唯一与文件相关的HTML控件是文件选择器()。

#3


Use Flash for this task and invoke this actions via JS

使用Flash执行此任务并通过JS调用此操作