Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting FolderBrowserDialog default path
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Setting FolderBrowserDialog default path
Miscellaneous
Thread ID:
01434804
Message ID:
01434804
Views:
199
Hello,

I have a windows app in .Net 3.5. When the user pushes a button, I would like to open the FolderBrowserDialog to a specified network drive. When I use the control, I see that there are specific default file locations built it, i.e., Desktop, My Documents, etc.; however, I do not see a manner in which you can set the default location to a network drive, i.e., N:\.

Is there a way to do this?

Here is my current code:

private void btnBrowse_Click(object sender, EventArgs e)
{
// Create a new FolderBrowserDialag object
FolderBrowserDialog fbd = new FolderBrowserDialog();
fbd.Description = " Please Select the ROOT directory in which you want to create the new folder structure. For new Clients, the ROOT directory should be your N:\ Drive.";
fbd.RootFolder = Environment.SpecialFolder.Desktop;
fbd.ShowNewFolderButton = true;
fbd.ShowDialog();
txtRoot.Text = fbd.SelectedPath;
}
Thanks,

TFISHER
Next
Reply
Map
View

Click here to load this message in the networking platform