Question

I'm working on an internal web app and I need to get a directory path from the user. I (obviously) can use the asp:FileUpload to get a file but I can't find anything to just get a directory path.

Is there any (preferably simple) way to have a directory-chooser dialog in asp.net? I haven't been able to find any solution on Google or SO yet...

Thanks

Was it helpful?

Solution

Because you are working on a web app, you are "stuck" with the limitations of what is allowed by the browsers. And I do not believe any of the browsers include a "directory-chooser".

You will probably just have to ask the user to paste the path into a textbox. You can then use some System.IO methods to verify the path is valid when the page is posted.

OTHER TIPS

Did you try basic HTML <input type="file"> ??? Or does this not serve your purpose?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top