浏览按钮以选择.net c#网页中的文件夹 [英] Browse button to select folder in web page in .net c#

查看:93
本文介绍了浏览按钮以选择.net c#网页中的文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 如何使浏览按钮让c#.net中的网页中选择文件夹而不是文件.

谢谢

Hi how can I make browse button to let select folder instead of file in web page in c#.net.

thanks

推荐答案

如果您有网络应用程序

然后您可以使用FileUpload控件.

如果您有Windows应用程序,请使用folderBrowserDialog控件,例如

If ur having web application

then u can use FileUpload control.

If ur having windows application the use folderBrowserDialog control like

DialogResult dgResult = folderBrowserDialog1.ShowDialog();
                if (dgResult == DialogResult.OK)
                {}


使用FileUpload控件.您可以在工具箱的标准"控件下找到它.
Use FileUpload control. You''ll find it under the "Standard" controls in your toolbox.


您无法选择要上传到服务器的文件夹.您宁可上载多个文件.

您需要一个文件上传控件 [在ASP.NET 2.0中上载多个文件 [
You cannot select a folder to be uploaded to the server. You will rather have to upload multiple files.

You need a FileUpload Control[^] for the same. Check the MSDN link I have given and scroll down to the section ''Uploading Multiple Files at the Same Time''. Or check this article - Uploading Multiple Files in ASP.NET 2.0[^].

Hope this helps!


这篇关于浏览按钮以选择.net c#网页中的文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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