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

Posted on 2003-03-12
Medium Priority
Last Modified: 2010-07-27
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
Question by:hbz
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Assisted Solution

spackd earned 100 total points
ID: 8125945
Does it have to be in the .config file? If you can use the cache, check out this article:
LVL 10

Accepted Solution

GoodJun earned 240 total points
ID: 8127911
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.

Author Comment

ID: 9049053

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

Quiz: What Do These Organizations Have In Common?

Hint: Their teams ended up taking quizzes, too.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question