Control Event

  • Thread starter Thread starter shapper
  • Start date Start date
S

shapper

Hello,

I am working on a Custom control which inherits from Composite
Control.
I perform a few actions on Init, Load and PreRender events of this
control.

How can I access this events inside my custom control code?

Thanks,
Miguel
 
Hi Miguel,

You can try the following code to achieve this.

public class MyControl : CompositeControl
{
public MyControl()
{
//
// TODO: Add constructor logic here
//
}

protected override void OnInit(EventArgs e)
{
base.OnInit(e);
}

protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
}

protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
}
}

Regards,
Manish
www.ComponentOne.com
 
Back
Top