| |||||||||||||
Creating New Configuration SectionsASP.NET Web Applications ASP.NET Configuration You can extend the standard set of ASP.NET configuration settings with XML configuration tags of your own. To do this, you must create your own configuration section handler. The handler must be a .NET Framework class that implements the IConfigurationSectionHandler interface. The section handler interprets and processes the settings defined in XML tags within a specific portion of a The following example defines an IConfigurationSectionHandler interface.
You can also define your own section that uses the same configuration handler as the appSettings section. For example: <configuration>
<configSections>
<sectionGroup name = "mygroup">
<sectionGroup name = "nestedgroup">
<section name = "mysection" type=
"System.Configuration.NameValueSectionHandler,System" />
</sectionGroup>
</sectionGroup>
</configSections>
<mygroup>
<nestedgroup>
<mysection>
<add key = "key_one" value = "1">
<add key = "key_two" value = "2">
</mysection>
</nestedgroup>
</mygroup>
</configuration>
You can then read the value of the new configuration section defined in the previous example, as follows:
See AlsoAccessing Configuration Settings ASP.NET Configuration Sections |
| ||||||||||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme