开发者

Input folder path in web application

开发者 https://www.devze.com 2023-04-02 20:57 出处:网络
I\'m developing a web application 开发者_如何学Gousing C#. I need the user to input a folder path to where he wants some files to be saved. I tried using FileUpload but ut can only select files, not f

I'm developing a web application 开发者_如何学Gousing C#. I need the user to input a folder path to where he wants some files to be saved.

I tried using FileUpload but ut can only select files, not folders. Is there a way to do so?

Edit:

I only need the folder path. it's not to upload, it's just as input for another function


No, and you probably noticed when selecting files to upload that it won't even give you the local path to the file in that instance - you just get the file name. The reason is that it is useless, since you can't read or write from the paths directly.

If you're talking about allowing the user to select a folder to save data to on your server then again, the answer is really no, although you could contrive something manually there is no native support for this, and for good reason; if you were to expose the selecting of paths on the server, surely it would be imitative of the real dialog anyway, allowing only selection of predefined relative paths which you decide (with perhaps no relation to the actual physical path on the server, who knows.)

0

精彩评论

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

关注公众号