如何在ASP.NET中实现文件夹浏览对话框 [英] How to implement folder browse dialog in ASP.NET

查看:94
本文介绍了如何在ASP.NET中实现文件夹浏览对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是在asp.net上的应用程序中创建的。按钮点击事件我想找到一个存储数据库备份的路径。请尽快分享我代码



我尝试过:



i尝试过MSDN,但我没有解决。

i was created on application in asp.net. on button click event i want find a path where i stored a backup of database. please share me Code asap

What I have tried:

i tried MSDN but it not solving by me.

推荐答案

你可以使用 FileUpload 控制。

查看以下链接以获取进一步的帮助 -

FileUpload类(System.Web.UI.WebControls) [ ^ ]

ASP.NET - 文件上传 [ ^ ]

使用ASP.NET上传文件 [ ^ ]



如果您的要求是,请告诉我与此不同。

谢谢:)
You can use FileUpload control.
Check following links for further help-
FileUpload Class (System.Web.UI.WebControls)[^]
ASP.NET - File Uploading[^]
File Upload with ASP.NET[^]

Please let me know if your requirement is different than this.
Thanks :)


对于客户端计算机,您不能这样做,唯一的浏览对话框是上传文件和路径到文件没有发送到服务器,只有文件名。



对于服务器你不能这样做,因为浏览器无法与服务器的文件通信系统。您必须实现自己的文件浏览器,如果你谷歌asp.net服务器文件浏览器,你可能会找到示例代码。
For the client computer you can't do this, the only browse dialog is for uploading files and the path to the file is not sent to the server, only the filename.

For the server you can't do this either as the browser has no way of communicating with the server's file system. You'd have to implement your own file browser, if you google "asp.net server file browser" you'll probably find sample code.


这篇关于如何在ASP.NET中实现文件夹浏览对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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