using folderBrowserDialog in asp.net?
well,
lets i say i got a littel page on a big webiste. and i need you to select a folder using :
folderBrowserDialog
when you click on button2
it will open a folderBrowserDialog in asp.net(Not MVC.)
what can i do? lets take this code as a explne for it:
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
开发者_StackOverflow社区 <h2>
Welcome.</h2>
<p>
In this page, you can Create\run bats files.</p>
<p>
</p>
<p>
<asp:button2 ID="Label1" runat="server" Height="25px" Text="Create">
</asp:Label>
any one?
You could get folderBrowserDialog to work but it would popup at the server, the client/browser would never see it so it would sit there forever waiting for input.
No, the .NET FolderBrowseDialog is not available for ASP.NET. If you want the user to select a folder (on the users local hard-drive) you probably need to use a Java-component.
If you need to let the user select a folder on the webserver, you can create your own FolderBrowseDialog look-a-like. :)
You can use things like SWF upload to provide the user with a user friendly good looking upload experience. It also has the possibility to upload multiple files / a folder. Check out : http://swfupload.org/project/asp_net
Or you can use a plain old:
form with method="post"
attribute enctype="multipart/form-data"
and a field like this:
input type="file" name="somename" size="chars"
精彩评论