My asp.net button is created at code behind and i require onclick event should be generate. This onclick event is created but not firing when button clicks at run time. I have given break point at opening braces of button click event
What I have tried:
Button ButtonFinish = new Button()
{
Text = "Finish"
};
ButtonFinish.Attributes.Add("class", "btn btn-group-toggle btn-primary");
ButtonFinish.Style["margin-bottom"] = "10px";
ButtonFinish.Attributes.Add("runat", "server");
ButtonFinish.Click += new EventHandler(this.ButtonFinish_Click);
private void ButtonFinish_Click(object sender, EventArgs e)
{
throw new NotImplementedException();
}