Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Custom Element for NameValueSectionHandler and DictionarySectionHandler

.NET Framework 1.1

Defines settings for custom configuration sections that use the NameValueSectionHandler or DictionarySectionHandler classes.



Child Elements


The <sectionName> element is a custom element defined by a <section> tag in the <configSections> element.

The following table shows the type of object the ConfigurationSettings.GetConfig method returns for each configuration section handler.


The following example shows how to declare sections that use the DictionarySectionHandler and NameValueSectionHandler classes. The custom elements are <dictionarySample>, which contains settings read by the DictionarySectionHandler class, and <mySection>, which contains settings read by the NameValueSectionHandler class.

      <section name="dictionarySample"
      <sectionGroup name="mySectionGroup">
         <section name="mySection"
            type="System.Configuration.NameValueSectionHandler,System" />
      <add key="myKey" value="myValue"/>
         <add key="key1" value="value1" />

Configuration File

This element can be used in the application configuration file, machine configuration file (Machine.config), and Web.config files that are not at the application directory level.

See Also

Configuration Sections Schema | Configuration Section Settings

© 2015 Microsoft