Composite Control as Template ...


Marc Castrechini

Currently I have a composite control that has some base functionality that I
want to use for the base of a number of different controls. It has a
multiview to manage a display state and an edit state and a number of
buttons (Edit, Save, Cancel) to drive the display. Furthermore, I've
implemented two Templates to drive the Display and Edit views from the

When implemented it looks like this:
<MW:mwBaseUserControl runat="server" id="mwTestBase" Width="300px" >


<asp:Label runat="Server" ID="lblTest" Text="test" />



<asp:TextBox runat="Server" ID="txtEdit" Text="test" />



So far everthing looks great. Now I want to use this control as a base to
create a number of other user controls so the derived controls are wrapped
with the basic functionality and display and can be easily setup using the
two templates

Can anyone point me to a resource to accomplish this?

Marc Castrechini

Disregard that prior post. We were over thinking this.

The command events are already being passed up through the composite control
to the calling page so we just needed to drop an instance of the composite
wrapper on the user control designer and fill in the templates.

Keep it simple ...

- Marc

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

No members online now.

Forum statistics

Latest member

Latest Threads