I use below code to add a dynamically control and += an event for it
override the OnInit event
protected override void OnInit(EventArgs e)
{
btnGo=new Button();
btnGo.ID="btnGo";
btnGo.Text="Go";
btnGo.CssClass="Button";
this.Controls.Add(btnGo);
this.btnGo.Click += new System.EventHandler(this.btnGo_Click);
base.OnInit (e);
}
<co*******@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
Hi all
Can anyone tell me how to add a click event for a user control page
dynamically???
Thanx
Krish.