I have a server control that performs some logic. I'd love to provide a default implementation of this logic in the code of the control, but allow a developer to pass an alternate implementation of this logic in as a delegate, if they wish.
So...
<prefix:MyControl FooLogicMethod="MyUtilityClass.MyFooLogicMethod" runat="server"/>
If they don't specify this, I'll use my default method. If they do specify it, I'll use the method they passed in.
Can I do this as a delegate, or do I need to reflect it?
You can't do it like that... the asp.net compiler won't recognize the syntax, its pretty basic what kind of databinding you can do. Instead you can do it codebehind and setting the delegate like this
var control = someID;
control.FooLogicMethod = new Delegate(MyUtilityClass.MyFooLogicMethod);