How do I associate for example the load event to a handler when I have AutoEventWireup="false"

  • Thread starter Thread starter Tony Johansson
  • Start date Start date
T

Tony Johansson

Hello!

This is a asp.net question that might somebody knows.

If I set the AutoEventWireup="false" I must do the wiring between the event
and the eventhandler myself.
So if I want to associate the Load event to a eventhandler that is called
Do_Load how to I do that in code ?

//Tony
 
Peter Duniho said:
It's just like events for any other C# code:

objectWithEvent.Load += Do_Load.

I first put association in the global section but this will gave an error I
just use the c-tor.
this.Load += Do_Load;

//Tony

//Tony
 
Back
Top