【发布时间】:2012-07-27 18:21:53
【问题描述】:
我想在服务器端的表格单元格中添加一个链接按钮控件。该单元格中还有文本,当我添加它时,它会被控件覆盖。如何将控件添加到单元格并保留文本?
//Create a table cell and add text to it
TableCell commentCell = new TableCell();
commentCell.Text = "Text to remain in the cell."
//Create a linkbtn and add it to the table cell
LinkButton lbtnComments = new LinkButton();
lbtnComments.Text = "...";
lbtnComments.Style["float"] = "right";
commentCell.Controls.Add(lbtnComments);
【问题讨论】: