Capturing Events before CreateChildControls in Composite Control

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.
 
J

John Saunders

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.
 

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

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top