代码:
private void Page_Load(object sender, System.EventArgs e)
{
if (!this.IsPostBack)
Bind();
} private void Bind()
{
table.EnableViewState = true;
TableRow tr = new TableRow(); Button btn = new Button();
btn.ID = "btnPageAdd";
btn.Text = "新增页面"; TableCell tc = new TableCell();
tc.ColumnSpan = 3;
tc.Controls.Add(btn);
tr.Cells.Add(tc); table.Rows.Add(tr);
}
private void Page_Load(object sender, System.EventArgs e)
{
if (!this.IsPostBack)
Bind();
} private void Bind()
{
table.EnableViewState = true;
TableRow tr = new TableRow(); Button btn = new Button();
btn.ID = "btnPageAdd";
btn.Text = "新增页面"; TableCell tc = new TableCell();
tc.ColumnSpan = 3;
tc.Controls.Add(btn);
tr.Cells.Add(tc); table.Rows.Add(tr);
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货