阅读来自Web.Config中变Web、Config

2023-09-04 01:50:31 作者:曾经的一句我爱你

如何添加从web.config中读取值?

How can I add and read value from web.config?

推荐答案

我建议你不要从你修改web.config中,因为每一次改变的时候,它会重新启动应用程序。

I would suggest you to don't modify web.config from your, because every time when change, it will restart your application.

但是,您可以使用阅读的web.config System.Configuration.ConfigurationManager.AppSettings

However you can read web.config using System.Configuration.ConfigurationManager.AppSettings