Storing values in the web.config - appSettings or configSection - which is more efficient?

后端 未结 3 1752
悲&欢浪女
悲&欢浪女 2021-02-05 21:55

I\'m writing a page that can use a couple of different themes, and I\'m going to store some information about each theme in the web.config.

Is it more efficient to cre

3条回答
  •  天命终不由人
    2021-02-05 22:41

    There will be no measurable difference in terms of efficiency.

    AppSettings is great if all you need are name/value pairs.

    For anything more complex, it's worth creating a custom configuration section.

    For the example you mention, I'd use appSettings.

提交回复
热议问题