I have the following in my App.config file
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="save" value="C:\Test"/>
</appSettings>
</configuration>
And the following in my Main.cs
private void tsSaveImage_Click(object sender, EventArgs e)
{
SaveFileDialog sd = new SaveFileDialog();
sd.Filter = "TIFF Files (*.tif)|*.tif";
sd.FilterIndex = 1;
sd.InitialDirectory =
}
I would like to know how I can use the value from the key to set the InitialDirectory. The idea being that Once the app is installed I want users to navigate to app.config file and change this just the once.
Is this a good way or are there better methods?
You can set the initail directory from web.config key by