.cs file

{

//Get the configuration information for this web application.

Configuration config =

   WebConfigurationManager.OpenWebConfiguration(Request.ApplicationPath);

//Make the change.

config.AppSettings.Settings["somekey"].Value = " some value";

//Save all the changes you've made since retrieving the configuration

//infomation.

config.Save()

}

web.config

{

<configuration>

<appSettings>

      <add key="somekey" value="some v value"/>

</appSettings>

<system.web>

     <!-- Configuration settings go here -->

</system.web>

</configuration>

}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-14
  • 2022-12-23
  • 2022-02-10
  • 2022-02-02
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-26
  • 2021-10-18
  • 2022-12-23
  • 2021-12-09
  • 2022-12-23
  • 2022-12-23
  • 2022-01-16
相关资源
相似解决方案