i am working on a project, with a set of usercontrols beeing loaded dynamically think about sort of a portal page with a bunch of widgets (blocks) and all of them are a usercontrol.
they have certain things in common, so i made them all derive from a masterBlock usercontrol
now is there a way to also have some output (in the .ascx) file in common?
anything i put in the ascx of the masterBlock is not rendered or overwritten by the derived block.
i was wondering if anyone has any hints to get this to work.
The *.ascx files can not be derived (maybe with some “magic” can). Derived can be only classes, sou you can create a MyUserControlBase class, which can create some common controls/output and provide it by protected/public properties to derived class (MyWeatherUserControl for example) which can common controls/output modify.
Sample code: