C#获取webconfig文件中的customsettingsnamekey

来源:互联网 发布:java notifyall 使用 编辑:程序博客网 时间:2024/06/17 11:59
在开发过程中,需要获取webconfig文件中的customsettings中的NameValue:
            var p = System.Configuration.ConfigurationManager.GetSection("customSettings");
            NameValueCollection NameValue = (NameValueCollection)p;
            string d = NameValue["db.connectionString"];
0 0