I have an ASCX that inherits from a WebControl
that has a 'CustomConfiguration' property of type CollectionConfigurationItem
. This configuration gets set elsewhere in the code, so by the time it gets to the ASCX it is set up to how I wish to use the data. At this point I'd like to render out another control using this configuration, like so:
<modules:DataModule runat="server" CustomConfiguration="<%# Model.CategoryListConfiguration %>" />
However, breaking into DataModule
always results in 'CustomConfiguration' being null, which is the default value for the property. I've tried adding a Bindable
attribute to the property but to no avail, and when I set an EventHandler for the DataBinding
event on the DataModule
it doesn't even get called.
How can I set this custom-class-typed property from the markup or, failing that what's the second-best method of getting this to work? Thanks for any light you can shed!