声明 table 格
TableCell cell0 = new TableCell();
此生成的Button会导致页面回发
//HtmlButton btn = new HtmlButton();
此为html按钮
HtmlInputButton btn = new HtmlInputButton();
btn.Value = "测试按钮";
btn.ID = "2";
给html按钮添加onclick属性
btn.Attributes.Add("onclick","openwindows();");
将此按钮搁到table格中
cell0.Controls.Add(btn);