aspx.cs文件中写以下内容:
AppSettingsReader  AppRead   =   new   AppSettingsReader();
string url   =   Convert.ToString( AppRead.GetValue( "addressUrl",   typeof(string)));  

config内容中另起一个节点:写以下内容

<appSettings> 
  <add   key= "addressUrl"   value= http://baidu.com/>  

</appSettings> 

这样就可以读取Config文件的内容了。

相关文章:

  • 2021-08-19
  • 2021-10-10
  • 2021-07-18
  • 2021-11-29
  • 2022-12-23
  • 2021-09-05
猜你喜欢
  • 2022-12-23
  • 2021-11-23
  • 2021-08-25
  • 2022-12-23
  • 2022-12-23
  • 2022-03-08
  • 2021-09-15
相关资源
相似解决方案