Capturing Events before CreateChildControls in Composite Control

  • Thread starter Thread starter Lucas Tam
  • Start date Start date
L

Lucas Tam

Hi all,


I think this question has been asked a bunch of times, but I couldn't find
a good answer on google groups.

What is the best way to capture events before CreateChildControls is fired?

For example, I have a nav bar with the following buttons:

<< 1 2 3 4 >>

I want to be able to capture the onClick Event before the navbar is
generated with CreateChildControls.

Any ideas?

Thanks.
 
Lucas Tam said:
Hi all,


I think this question has been asked a bunch of times, but I couldn't find
a good answer on google groups.

What is the best way to capture events before CreateChildControls is fired?

For example, I have a nav bar with the following buttons:

<< 1 2 3 4 >>

I want to be able to capture the onClick Event before the navbar is
generated with CreateChildControls.

Any ideas?

Lucas,

First of all, you will probably get better answers to this question in the
microsoft.public.dotnet.framework.aspnet.buildingcontrols newsgroup.

Now, I'm guessing that you have a composite "Navbar" control, and that it
contains child controls which are the buttons on the nav bar. I'd say that
if you are in control of the buttons, you should set them to post back to
Navbar.UniqueID, passing an argument which identifies the button. That way,
the click event is effectively your Navbars click event, and not that of the
individual buttons.
 
Back
Top