I am creating buttons in my c# as follows:
Button CommentButton = new Button();
CommentButton.Text = "Add Comment";
CommentButton.ID = threadvar.ToString();
CommentButton.Click += new EventHandler(Add_ThreadComment);
PlaceHolderComments.Controls.Add(Com ...
Go to the complete details ...