我有一个HTML表格在我的代码后面动态添加。给边界动态添加的HTML表格
我可以给整个表的边框。
我该怎么做每行?我想在每一行下添加一个边框。
如何在运行时向单元添加超链接?
我已经试过是
tdr.Width = "100px";
tdr.Attributes.Add("class", "float-left");
row = new HtmlTableRow();
cell = new HtmlTableCell();
cell.InnerText = doc;
row.Cells.Add(cell);
tdr.Rows.Add(row);
row = new HtmlTableRow();
cell = new HtmlTableCell();
cell.InnerText = "No Timming";
row.Cells.Add(cell);
tdr.Rows.Add(row);
row = new HtmlTableRow();
cell = new HtmlTableCell();
cell.InnerText = weekday[i];
row.Cells.Add(cell);
tdr.Rows.Add(row);
我的CSS:
<style type="text/css">
.float-left
{
float:left;
border-style:solid;
border-width:2px;
border-color:Black;
}
</style>
该属性被添加,但在表的设计没有影响然后如何添加超链接到单元格的值 – user2177370 2013-03-20 13:07:40
我使用'cell.Attributes.CssStyle.Add(“color”,“#FF0000” );'和结果为'