SOLID , MasterPages and ASCX?

oliceoijng

New Member
I need to create a layout for a site. (I'm currently working on the master page).However the logo (ascx) an be at different locations : ( location determined by query string value...).
CkDrF.jpg
  • Should the \[code\]ascx\[/code\] know where to render itself by a query string
or
  • Should the \[code\]master page\[/code\] provide it where to be rendered ?
FYI According to DIP ( Dependency Inversion) : \[quote\] High-level classes should not depend on low-level classes. Both should depend on abstractions\[/quote\]So I guess that in thc ctor of the master page , I should provide to the ascx ctor where it should be rendered.like in this first sample
  • Am I right ? or , there is a better way ?
(p.s. I already know that masterpage is also inherits \[code\]usercontrol\[/code\]).
 
Back
Top