当前位置:编程学习 > C#/ASP.NET >>

.Net配置文件常用配置说明

配置文件内容如下:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="mySection" type="System.Configuration.NameValueSectionHandler"/>
<section name="mySingleTagSection" type="System.Configuration.SingleTagSectionHandler"/>
<section name="myDictionarySection" type="System.Configuration.DictionarySectionHandler"/>

<sectionGroup name="mySections">
<section name="mySection1" type="System.Configuration.NameValueSectionHandler"/>
<section name="mySection2" type="System.Configuration.NameValueSectionHandler"/>
</sectionGroup>
</configSections>

<mySection>
<add key="key1" value="value1" />
<add key="key2" value="value2" />
</mySection>

<mySingleTagSection setting1="value1" setting2="value2" setting3="value3" />

<myDictionarySection>
<add key="DictionarySectionKey1" value="DictionarySectionValue1"/>
<add key="DictionarySectionKey2" value="DictionarySectionValue2"/>
<add key="DictionarySectionKey3" value="DictionarySectionValue3"/>
补充:asp.net教程,基础入门
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,