<appSettings>
<t title="t1" text="text1" xx="xxx1" />
<t title="t2" text="text2" xx="xxx2" />
 </appSettings>怎么读出值啊? public NameValueCollection GetWebConfig(string _Key)
{
object settings = ConfigurationSettings.GetConfig(_Key); 
NameValueCollection nvc = settings as NameValueCollection; 

return nvc;
}//GetWebConfig("appSettings/t");

解决方案 »

  1.   

    <appSettings>
    <add key="Name" value="value"/>
     </appSettings>
      

  2.   

    按照yurow(夕阳轨迹)的写法如果ASP.net 2.0
    ConfigurationManager.AppSettings["name"].ToString()如果ASP.net 1.1
    ConfigurationSettings.AppSettings["name"].ToString()
      

  3.   

    System.Configuration.ConfigurationSettings.AppSettings[""]
      

  4.   

    <configSections>
            <section name="MyToken" type="System.Configuration.SingleTagSectionHandler,System" />
        </configSections>我后来用了这个,我是需要自定义节点的,谢谢大家!
      

  5.   

    <configSections>
            <section name="MyToken" type="System.Configuration.SingleTagSectionHandler,System" />
        </configSections>我后来用了这个,我是需要自定义节点的,谢谢大家!
    有没有源码,贴出来看看阿