asp.net C# 获得配置文件AppSettings 的值

 using System.Configuration;//导入命名空间 //配置文件 Web.config //在程序里获得配置文件的Key对应的值 System.Configuration.ConfigurationSettings.AppSettings["SqlConnectionStr"]; System.Configuration.ConfigurationManager.AppSettings["SqlConnectionStr"]; System.Configuration.ConfigurationManager.ConnectionStrings["SqlConnectionStr"].ToString();

你可能感兴趣的:(ASP.NET,开发)