Juliet's answer is on point, but FYI you can also put additional configs in external .config
files, by setting up your web.config
as follows:
<?xml version="1.0"?>
<configuration>
<configSections>
<!-- blah blah the default stuff here -->
<!-- here, add your custom section -->
<section name="DocTabMap" type="System.Configuration.NameValueFileSectionHandler, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>
<!-- your custom section, but referenced in another file -->
<DocTabMap file="CustomDocTabs.config" />
<!-- etc, remainder of default web.config is here -->
</configuration>
Then, your CustomDocTabs.config
looks like this:
<?xml version="1.0"?>
<DocTabMap>
<add key="A" value="1" />
<add key="B" value="2" />
<add key="C" value="3" />
<add key="D" value="4" />
</DocTabMap>
Now you can access it in code via:
NameValueCollection DocTabMap = ConfigurationManager.GetSection("DocTabMap") as NameValueCollection;
DocTabMap["A"] // == "B"