Background
Everyone is very familiar with the configuration file, as for how to play on each other. I stumbled on an open source project to see the cow writing code, which has about the operation of the configuration file aspects. Marvel at the art of the code when, more is sigh, alas! Master really many, I can reach this level, step by step, maybe, 3, 5几 years later brother also became a master, haha. Low-key, must be low-key!
Configuration Custom Action Basics
First of all, I summarized the more superficial code, familiar with the basic operation, and then look at the asp.net mvc in the configuration how to play. As the following illustration shows, let's start with just a few classes and a simpler configuration file (the red box below):
Web.config is as follows:
Code highlighting produced by Actipro Codehighlighter (freeware)
http://www. codehighlighter.com/
--> 1 <?xml version= "1.0"?>
<configuration>
<configsections >
<section name= "democonfiguration" type= "Core.Configuration.Operation.DemoConfigurationSection, Core.configuration "/>
</configSections>
<democonfiguration configsource=" Config\demo.config "/>
<system.web>
<compilation debug=" true "targetframework=" 4.0 "/>
</system.web >
</configuration>