Last post Mar 14, 2018 02:54 PM by dolot314
Mar 08, 2018 10:08 PM|dolot314|LINK
So what I'm thinking about is having a section in web.config that looks like regular xml. Something like the following:
Something like that, and then access it through the ConfigurationManager object in code somehow.
Am I on the right track? Is what I'm thinking of doable - maybe not exactly like I've outlined above but in a similar way? Or am I completely off base?
Any input appreciated!
Mar 12, 2018 08:14 AM|Brando ZWZ|LINK
As far as I know, we could extend ASP.NET configuration settings with XML configuration elements of your own.
To do this, you create a custom configuration section handler
. The handler must be a .NET Framework class that inherits from the System.Configuration.ConfigurationSection class.
The section handler interprets and processes the settings that are defined in XML configuration elements in a specific section of a Web.config file.
You could read and write these settings through the handler's properties.
More details about how to implement custom configuration section handler, you could refer to below tutorial.
Mar 13, 2018 07:31 PM|dolot314|LINK
Thanks for the response on that. I'll take a look at this and do some research and see if it meets my needs.
Mar 14, 2018 02:54 PM|dolot314|LINK
For reference for others who may read this thread, here's a couple more links that I found a little more helpful than the standard MS documentation:
Creating Custom Configurations
how to add custom configuration settings for an asp.net application