Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
The difference between the windows forms example and the web forms example, is the control has a tagged portion. I imagine this can be overcome, some day, as web applications compile everything (at least in some instances), but it is not the case today.
You can, however, slap a user control on another user control, ad nauseum. It will not give you inheritance, but it does allow you to adorn a particular control with additional controls by making a composite of the original control and the stuff you need to add to it. That might solve your problem?
–
–
You could certainly inherit the base user control in code and insert your additional controls in code, if you are talking building in a visual designer then I'm not sure. I'm aware of creating composite controls from both system.web controls and user controls so there's no reason that your new control couldn't contain another user control with additional controls added around it.
Thanks for contributing an answer to Stack Overflow!
-
Please be sure to
answer the question
. Provide details and share your research!
But
avoid
…
-
Asking for help, clarification, or responding to other answers.
-
Making statements based on opinion; back them up with references or personal experience.
To learn more, see our
tips on writing great answers
.