我正在做一个仅用于打印的aspx页面,在我的html中包含很少的东西,里面的表我想让它显示在每一页上。
HTML
<thead>
<table> </table>
</thead>
<tbody>
<asp:gridview></asp:gridview>
</tbody>
C#
// I tried to break it on the row I want
foreach (GridViewRow row in gv.Rows)
{
if (row.RowIndex == Convert.ToInt32(breaking[z]))
{
row.Attributes["style"] = "page-break-after:always;";
}
}
升级到IE 11后,标题不会出现在第二页上。然后我尝试使用IE 8,但这是第一页thead
和tbody
之间的一个很大的空间。
有人可以帮忙吗?