I want to bind TextBox's Text property to FolderBrowser's SelectedPath property. But it's not working, I don't know why. Please help me out why it's not working?
Data binding makes very little sense here. Just make your code look like this:
if (folderBrowserDialog1.ShowDialog() == DialogResult.OK) {
// User picked a path and didn't cancel the dialog...
textBox1.Text = folderBrowserDialog1.SelectedPath;
}
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.