Web.config中:
<appSettings>
<add key="ConnectionString" value="server=.;database=bbs;uid=sa;pwd=;"/>
</appSettings>
.aspx.cs中:
System.Configuration.ConfigurationSettings.AppSettings["ConnectionString"];
<appSettings>
<add key="ConnectionString" value="server=.;database=bbs;uid=sa;pwd=;"/>
</appSettings>
.aspx.cs中:
System.Configuration.ConfigurationSettings.AppSettings["ConnectionString"];