转:打开Web.Config在 <configuration> 后面添加:
打开Web.Config在 <configuration> 后面添加:
<appSettings>
<add key= "ConnectionString " value= "你的连接字符串 " />
</appSettings>
在程序中获取:
string connectionString = ConfigurationSettings.AppSettings[ "ConnectionString "];
<appSettings>
<add key= "ConnectionString " value= "你的连接字符串 " />
</appSettings>
在程序中获取:
string connectionString = ConfigurationSettings.AppSettings[ "ConnectionString "];