N
ndario
i am working on some sort of template for my site and i am extending
UserControl.
inheritance goes like this
UserControl
|
BaseUserControl (contains common functions for all user controls, no
ascx, just cs)
|
MyUserControl (visulay designed concrete control to be put in
placeholder in main page)
in BaseUserControl i'd like to have a property of type Panel which
would contain widgets, but Panel is supposed to be designed visualy in
the MyUserControl. so if i add Panel to MyUserControl in designer and
give it the same name as it has in BaseUserControl, designer adds
reference to code behind to that panel which then hides inherited
reference from BaseUserControl. If i delete that reference from
MyUserControl, everything is fine, page opens correctly, but as soon
as i switch to designer it adds refernce to code behind again.
is there any workaround this? when i put user controls on the page i
must manualy add reference to code behind, that is sort of behaviour i
want for this case.
thanks everybody
UserControl.
inheritance goes like this
UserControl
|
BaseUserControl (contains common functions for all user controls, no
ascx, just cs)
|
MyUserControl (visulay designed concrete control to be put in
placeholder in main page)
in BaseUserControl i'd like to have a property of type Panel which
would contain widgets, but Panel is supposed to be designed visualy in
the MyUserControl. so if i add Panel to MyUserControl in designer and
give it the same name as it has in BaseUserControl, designer adds
reference to code behind to that panel which then hides inherited
reference from BaseUserControl. If i delete that reference from
MyUserControl, everything is fine, page opens correctly, but as soon
as i switch to designer it adds refernce to code behind again.
is there any workaround this? when i put user controls on the page i
must manualy add reference to code behind, that is sort of behaviour i
want for this case.
thanks everybody