tags:

views:

522

answers:

3

I have created a user control with web controls defined in the aspx file and made it's codebehind class abstract. I extend this class with another user control, but the the controls in the initial markup file don't get generated. How do i generate them for every user control extending the abstract class and how do i make them accessible?

A: 

If by generated you mean generate the tags in the ASPX file you can't. It doesn't work like that.

Spencer Ruport
+1  A: 

User Controls really can't be truely extended. You can base your code behind on abstract / extended classes but there is no way to do that with markup.

Consider creating custom server based controls.

Andrew Robinson
+1  A: 

Create a Composite Control http://wiki.asp.net/page.aspx/217/composite-controls/ and take a look at http://msdn.microsoft.com/en-us/library/aa479016.aspx

basically you can create a custom control and add other controls in the back end

Bob The Janitor