【发布时间】:2012-04-30 13:49:24
【问题描述】:
如何通过 C# 中的代码从 web.config 中获取所有连接字符串的名称?
我试过了:
System.Configuration.Configuration webConfig = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~");
ConnectionStringsSection x = webConfig.ConnectionStrings;
string here = x.SectionInformation.Name;
【问题讨论】:
标签: c# web-config connection-string