Other that appsetting, you have one more option
Using <CustomSection> Section:
You can create your own custom sections in a configuration file. The
easiest way to do this is to configure one of the
pre-existing configuration section handlers, assuming your section uses one
of the generic structures such as name-value
data, or single tag data.
In this particular case you might use the Name-Value data. To do this, you
need to use the pre-defined section handlers.
For example, you can define a section called <myNameValueSection>
<myNameValueSection>
<add key="ConnectionString" Value="my connection string" />
<myNameValueSection>
to read the data, you will need the following code snippet
NameValuecollection config =
ConfigurationSettings.GetConfig("myNameValueSection");
Foreach (string key in config.keys)
{
label1.Text = "Key:" + key.toString();
label2.Text = "Value:" + config[key];
}