In the current architecture od our application I have to use composite controls to implement significant amount of HTML UI.
It will not be good to load child user controls into parent composite control(but technically probably still possible).
I’ve followed the approach described in David Ebbo’s Turning an ascx user control into a redistributable custom control blog post (and in MSDN article).
However if you want to modify the control, process of Publish and copy DLL may be annoyed.
I’ve decided to take generated user control as starting point and after this to do modifications manually.In particular I needed to pass parameters to my composite control.
I’ve just used Reflector’s FileDisassembler add-in to get source of composite control and made changes manually.
However if I need to do significant HTML changes, I will haveto do the same User Control to custom control process again.
It seems that K. Scott Allen’s approach in Using MSBuild and ILMerge to Package User Controls For Reuse post required less work in change/build/debug cycle. Unfortunately the article has XML snippets corrupted. But the thread has build file example. I am going to try it.
When I searched for a solution, I found out of the topic, but useful post LoadControl a UserControl – *and* pass in Constructor Parameters .