You have to make sure you attach to the click event on page load. In fact you'll probably have to do all of your ButtonFinish code on page load
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);
Here's an example with context, you need a place on the page for your button to appear, so add a PlaceHolder in the location you want to show the button
<asp:PlaceHolder ID="PlaceHolder1" runat="server" />
The code-behind looks like this
protected void Page_Load(object sender, EventArgs e)
{
Button ButtonFinish = new Button()
{
ID = "btnFinish",
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);
PlaceHolder1.Controls.Add(ButtonFinish);
}
private void ButtonFinish_Click(object sender, EventArgs e)
{
throw new NotImplementedException();
}