web.config

<configuration>

<appSettings>
  <add key="DBConnectionString" value="server=localhost;database=web;uid=sa; pwd="/>
 </appSettings>
</configuration>

----------------------------------------------------------------------------------------------------------

xxx.aspx.cs

SqlConnection conn = new SqlConnection(ConfigurationManager.AppSettings["DBConnectionString"]);

相关文章:

  • 2021-11-08
  • 2022-12-23
  • 2021-08-25
  • 2021-10-07
  • 2022-12-23
  • 2021-11-14
猜你喜欢
  • 2021-07-05
  • 2022-12-23
  • 2018-07-08
  • 2021-07-31
  • 2022-12-23
  • 2021-07-26
  • 2021-08-27
相关资源
相似解决方案