tags:

views:

19

answers:

2

Can I store custom XML in web.config ? I want to store an XML dom (to store some of my site settings) in my web.config, so the application can read that xml dom and show that value in my page.

+1  A: 

Yes you can. You will need to implement a custom ConfigurationSection, a custom ConfigurationElementCollection, and a custom ConfigurationElement.

A nice example is provided on MSDN: http://msdn.microsoft.com/en-us/library/2tw134k3.aspx

code4life
+1  A: 

Yes, you can.

You can use olddays IConfigurationSectionHandler interface or use more modern (though overenginered for my taste) approach with custom configuration sections

Andrew Florko