简体   繁体   中英

Folder selection in MVC web application c#

I am working on one MVC web application project, which require one field called folder selection just like FolderBrowserDialog in windows application.

Help me to find that FolderBrowserDialog for web application. Is there any solution for folder selection in MVC??

Short answer is no. You can use a to select a file, but modern browsers will not send a path for security reasons (and your browser does not have access to paths on the server)

There is no such control (except using ActiveX Control or Java Applets), so don't waste your time to look for it and you can not get any folder path(on the client machine) with JavaScript due to security reasons.

Why don't you just allow the user to download the file and user will select the folder where he wants that file to be saved or else it will get saved in default folder of the browser.

Hope it helps, thanks.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM