Helo
Can someone explain to me how to get the configuration item from the .config file. I know how to handle attributes, but not elements. As an example, I want to analyze the following:
<MySection enabled="true"> <header><![CDATA[ <div> .... </div> ]]></header> <title> .... </title> </MySection>
My C # code looks like this:
public class MyConfiguration : ConfigurationSection { [ConfigurationProperty("enabled", DefaultValue = "true")] public bool Enabled { get { return this["enabled"].ToString().ToLower() == "true" ? true : false; } } [ConfigurationProperty("header")] public string header { ??? } }
It works with attributes, how should I do with elements (a property of the header in the above code)?
c # web-config configuration app-config
majkinetor
source share