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
 

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

Similar Threads

Event 1
Control, Web Control and Composite Control 6
Control is Null : Please Help 2
Event 2
Events and Properties 3
PreRender on my User control not firing 2
Override Css Class 1
Get Controls 2

Back
Top