对于创建运行时的LinkButton我用这个代码创建运行时的LinkButton
for (int i = 0; i <= 10; i++)
{
r = new TableRow();
t.Rows.Add(r);
for (int j = 0; j <= 2; j++)
{
c = new TableCell();
r.Cells.Add(c);
LinkButton btnLnk = new LinkButton();
btnLnk.Text = "Hello";
btnLnk.Visible = true;
btnLnk.CommandName = "Test";
btnLnk.CommandArgument = "1";
btnLnk.ID = "Hi";
c.Controls.Add(ll);
}
}
该错误发生...
“类型‘的LinkButton’的控制‘ctl34’必须放在一个窗体标记内与RUNAT =服务器。“
请给我soluation此
固定您的回复添加表格的形式。 – Blindy 2009-12-28 12:27:00