Reputation: 218762
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.
Upvotes: 2
Views: 2295
Reputation: 7750
Yes, you can.
You can use olddays IConfigurationSectionHandler interface or use more modern (though overenginered for my taste) approach with custom configuration sections
Upvotes: 1
Reputation: 15794
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
Upvotes: 1