Hi,
I have a class that represents a configuration element:
public class ProductLevelConfigurationElement
: ConfigurationElement, IProductLevelConfiguration
{
[ConfigurationProperty("level",IsKey = true, IsRequired = true)]
public ProductLevel Level
{
get { return (ProductLevel)this["level"]; }
set { this["level"] = value; }
}
[ConfigurationProperty("include")]
public bool Include
{
get { return (bool)this["include"]; }
set { this["include"] = value; }
}
}
In web.config I want to configure it like:
<item level="1" include="true" />
But it doesn't work. If I put MainProduct
in level attribute (one of the values of this enum) then it works perfect.
Any thoughts on how to solve this?