Lloyd,

I think that the events are being "bubbled up" to your page.

You may want to read up on bubbling events.

I have some sample code on my web site, [url]www.aboutfortunate.com[/url], which shows
how to override the OnBubbleEvent. I'm using controls which are added to
placeholders on my page (similar to what you are doing) and if a button in
one of the controls is clicked I need to capture the event using the
OnBubbleEvent. If you search my code library for: "Bubble Event" or
something similar you'll find the listing easily.

(The code is in VB but it's pretty easy to understand and you could port it
to C# quite easily.)

Good luck!

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
[url]www.aboutfortunate.com[/url]

"Out of chaos comes order."
Nietzche


"Lloyd Dupont" <lloydRemoveIfNotSpamming.galador.net> wrote in message
news:eNJrZJlXDHA.1644TK2MSFTNGP10.phx.gbl...
> I have a page design with header, footer, sidebar and body.
> recently I wrote an web custom control (in C# only) to avoid copy paste
the
> presentation code, I created a control like that
>
> [PChildren(true)]
> class PageTemplate : WebControl
> {
> [TemplateContainer(typeof(ElementContainer))]
> ITemplate Body {}
>
> [TemplateContainer(typeof(ElementContainer))]
> ITemplate Header {}
>
> [TemplateContainer(typeof(ElementContainer))]
> ITemplate Footer {}
>
> [TemplateContainer(typeof(ElementContainer))]
> ITemplate SideBar {}
> }
>
> I also override CreateChildControls() and OnDataBinding() as explained in
> the doentation.
>
> my problem is my events (when I click any links, buttons or whatever UI
> which will do a postback) do nothing since I use this template !
>
> could it be because I also override Render(HtemlTextWriter output) ?
> but in it I basically write plain HTML and some call to
> elementContainer.RenderControl(output);
>
>