0
Reply

How to make use of DefaultValue by custom webcontrol

Schrander

Schrander

Oct 29 2010 3:01 AM
1.8k
I've made a WebControl which inherits the BulletedList.  I created some properties like ActiveBackgroundColor and InactiveBackgroundColor.
Above these properties I placed [DefaultValue(typeof(Color), "Green")]. But when I call my customControl in the webform it gives an Object Reference error.
Why won't the control uses the DefaultValues?