1、调取“AppSettings”里的内容
string _hscjHeaderKey = WebConfigurationManager.AppSettings["HttpHeaderKey"];
2、调取数据库连接配置
需要先引用“using System;”
/// <summary> /// 本地数据库连接 /// </summary> public static string connectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
标签:Web,Webservice,C#,AppSettings,ConnectionString,config,调取 From: https://www.cnblogs.com/icewatermei/p/17324734.html