标签:country manage value 读取配置 配置 manager style web app
Web.config file:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings configSource="Config\app.config"></appSettings>
</configuration>
Ps. configSource="Config\app.config",此处一定要使用反斜杠“\”;
Config\app.config file:
<?xml version="1.0"?>
<appSettings>
<add key="Version" value="1.0.0" />
<add key="Country" value="China"/>
</appSettings>
读取配置文件值:
string value = ConfigurationManager.AppSettings["Country"].ToString();
ASP.Net Web.config中引用外部config文件
标签:country manage value 读取配置 配置 manager style web app
原文地址:https://www.cnblogs.com/by-lhc/p/8797054.html