Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Defines a namespace for configuration sections.
<configuration>
<configSections>
<sectionGroup>
Syntax
<sectionGroup name="section group name">
<!-- Configuration sections -->
</sectionGroup>
Attribute
| Attribute | Description |
|---|---|
name |
Required attribute. Specifies the name of the section group you're defining. |
Parent element
| Parent element | Description |
|---|---|
<configSections> |
Contains configuration section and namespace declarations. |
Child elements
| Child 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.