文件夹路径选择窗口而不是文件选择窗口 [英] Folder Path Selection Window instead of File Selection Window

查看:94
本文介绍了文件夹路径选择窗口而不是文件选择窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我想批量上传文件夹的内容(基本上是将文件夹结构从我PC中的任何位置移动到特定文件夹)

为此,我想提供一个文件夹选择窗口(就像我们上传文件一样)

上传时我在DB中插入记录(父子树正常工作)



截至目前,我已经给出了一个文本框,其中我粘贴了文件夹路径。而且功能很棒。我只需要窗口选择文件夹。





我试过了以下内容



Shell Stuff [ ^ ]



这个 [ ^ ]



这个 [ ^ ]





抛出错误权限被拒绝!!



这样做是在asp.net中我很难,如果它根本不可行,任何人都可以建议一些替代粘贴路径在文本框中。



I want to Bulk upload the contents of folder(which is basically moving folder structure from any where in my PC to specific folder)
For this I want to provide a window for folder selection (as we do for file upload)
On upload I insert records in DB (parent child tree which is working fine)

As of now I have given a text box in which I paste the folder path. And functionality is working great. I just need the Window for folder selection.


I have tried the follwing

Shell Stuff[^]

This[^]

This[^]


It throws error Permission Denied!!

Doing this is difficult in asp.net I guess, if its not at all feasible can anyone suggest some alternative to pasting path in text box.

推荐答案

嗯,您的链接仅适用于只能在IE中使用的一种方法。你不能用C#编写这段代码。 ASP.NET代码仅在服务器上运行,而不在客户端浏览器上运行。如果这就是你所做的,那就毫无疑问它不起作用。





谷歌的 JavaScript文件夹浏览器 [ ^ ]用于在客户端javascript代码中执行此操作的示例。
Well, your links are just for one method that will only work in IE. You cannot write this code in C#. ASP.NET code runs only on the server, not on the client browser. If that's what you did, it's no surprise that it doesn't work.


Google for "javascript folder browser[^]" for examples of doing it in client-side javascript code.


这篇关于文件夹路径选择窗口而不是文件选择窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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