Export (0) Print
Expand All

<sectionGroup> Element

.NET Framework 1.1

Defines a namespace for configuration sections.

<configuration>
   <configSections>
      <sectionGroup>

<sectionGroup
   name="section group name"/>
</sectionGroup>

Required Attributes

Attribute Description
name Specifies the name of the section group you are defining.

Child Elements

Element Description
<section> Contains a configuration section declaration.

Remarks

Declaring a section group creates a container tag for configuration sections and ensures that there are no naming conflicts with configuration sections defined by someone else. You can nest <sectionGroup> elements within each other.

Example

The following example shows how to declare a section group, and declare sections within a section group.

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

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

Custom Element for NameValueSectionHandler and DictionarySectionHandler | Custom Element for SingleTagSectionHandler | Configuration Section Settings | Configuration Section Schema

Show:
© 2015 Microsoft