void deleteButton_Click(object sender, EventArgs e) { //throw new NotImplementedException(); if (MyPanel.FindControl("newButton") != null) { MyPanel.Controls.Remove(MyPanel.FindControl("newButton")); } }