Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 691
  • Last Modified:

Web.Config / AppSettings - For Name/Value only?

I was wondering whether is was possible to store slightly more complex data in AppSettings.  For example, XML or HTML snippets?  If so, how?

(I'd rather not try to do name/value for this, since HTML can contain double quotes, and would be messy.)

- hbz
2 Solutions
Does it have to be in the .config file? If you can use the cache, check out this article:
you can add your xml like data in the section <configSections> in the web.config file. Since Appsettings is only for name/value pair kind of data.
The configSections is for complex data in hierach.
seach msdn on configsections, it will gives detail how to do this.
hbzAuthor Commented:

Sorry it's taken so long to get back to you both.  Work has been so busy that I haven't gotten the chance to try either of the two solutions, but I just wanted to close out this question.

- hbz

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now