当前位置 博文首页 > qq_39111577的博客:ASP.Net获取Web.Config中的配置数据
qq_39111577的博客:ASP.Net获取Web.Config中的配置数据
作者:[db:作者]
时间:2021-06-19 09:42
- 命名空间System.Configuration或者System.Web.Configuration
- System.Web.Configuration.WebConfigurationManager.AppSettings[strKey];strKey为AppSettings中的key,通过key获取value值。
- System.Web.Configuration.WebConfigurationManager.connectionStrings[strKey];strKey为connectionStrings中的name,通过name获取后面的数据库配置信息。