开发者

How do I get a pathname in ASP.NET?

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


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.


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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜