开发者

How do I add a browse file system button to a Visual Studio app?

开发者 https://www.devze.com 2023-01-03 04:47 出处:网络
I am looking to add a browse button to a visual studio app something simular to the the dialog box in the \'fileupload\' tool. I am looking to be able to graphical开发者_开发问答ly select any file fro

I am looking to add a browse button to a visual studio app something simular to the the dialog box in the 'fileupload' tool. I am looking to be able to graphical开发者_开发问答ly select any file from my computer or a computer across a network.


There is a FileUpload control...

http://www.dotnet-webhosting.com/aspnet-2-0-tutorials/asp-net-2-0-fileupload.aspx

Otherwise, the SWF uploader is very popular if you want something richer: http://www.swfupload.org/

EDIT:

The OpenFileDialog is a WinForms control and there is no equivalent in ASP.NET. When using a FileUpload the browser knows to provide you with a file picker to browse your local system. There is no way to replicate this behaviour with some type of local ActiveX control. This is a natural and deliberate limitation of the web, the application should not be able to access your local file system apart from in exceptional and well-defined circumstances.

0

精彩评论

暂无评论...
验证码 换一张
取 消