开发者

How to select folder using ASP.NET

开发者 https://www.devze.com 2022-12-31 15:52 出处:网络
i want select folder using asp.net , when i c开发者_运维知识库lick browse button it will open file selection dialog.There is no html control for folder selection - so this is not possible with ASP.Net

i want select folder using asp.net , when i c开发者_运维知识库lick browse button it will open file selection dialog.


There is no html control for folder selection - so this is not possible with ASP.Net.


You Can Add:

1- Folder Browser Dialog (For Folder) and use it Like This:

    `if(folderBrowserDialog1.ShowDialog() != DialogResult.Cancel)
         string str = DialogFolderBrows.SelectedPath;`

2- Open File Dialog (For File)
and use it Like This:

   `if(openFileDialog1.ShowDialog() != DialogResult.Cancel)
         string str = DialogOpenFile.FileName;` 
0

精彩评论

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

关注公众号