2
如何在asp.net(C#)表的行和列之間繪製邊框?在表的行和列之間繪製邊框
我有以下幾點:
在代碼隱藏文件中我添加行:
for (int i = 0; i < games.Count(); i++)
{
TableRow tr = new TableRow();
for (int j = 0; j < 9; j++)
{
TableCell tc = new TableCell();
tc.Text = games[i].getData(j);
tr.Cells.Add(tc);
}
tr.BorderWidth = 1;
tr.BorderColor = Color.Black;
Table1.Rows.Add(tr);
}
不過,我看不到行和表之間的cols任何邊界。 表是:
那麼,如何在asp.net錶行和cols之間繪製邊框?
CSS樣式,你可以用:#表1 { 邊界崩潰:崩潰; } #Table1,td,th#Table1 { border:1px solid black; } – CjCoax