extending and editing user control

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top