在HTML / ASP强制分页符打开和打印多条记录时, [英] Force page break in HTML/ASP when opening and printing multiple records

查看:212
本文介绍了在HTML / ASP强制分页符打开和打印多条记录时,的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有一个Repeater控件,其中列出了一堆信息,每个工作人员......此起彼伏。问题是,当我尝试打印这个名单我已经记录的工作人员在页面中间开始了。 我想迫使每个记录/中继器项目的开头或结尾分页符来解决这个问题。我怎样才能做到这一点?

如果它的任何帮助,这是页面的结构:

 <身体GT;
     <形式为GT;
          < ASP:直放站>
               <&ItemTemplate中GT;
                    <表>
                       <一串HTML>
                       < /一串HTML>
                    < /表>
               < / ItemTemplate中>
          < / ASP:直放站>
     < /表及GT;
< /身体GT;


解决方案

将以下code。在HTML的HEAD:

 <风格类型='文字/ CSS'>
P.pagebreakhere {分页符-前:总是}
< / STYLE>

然后将其放置在HTML的BODY以下code,你想要的分页符:

 &LT,P CLASS =pagebreakhere>

So I have a repeater control that lists a bunch of information for each staff member...one after another. Problem is when I try to print this list I have staff records starting out in the middle of the page. I would like to solve this issue by forcing a page break at the beginning or end of each record/repeater item. How can I accomplish this?

If it's any help, this is the structure of the page:

<body>
     <form>
          <asp:repeater> 
               <itemtemplate>
                    <table> 
                       <bunch of html>
                       </bunch of html>
                    </table>
               </itemtemplate>
          </asp:repeater>
     </form>
</body>

解决方案

Place the following code in the HEAD of the html:

<STYLE TYPE='text/css'>
P.pagebreakhere {page-break-before: always}
</STYLE>

Then place the following code in the BODY of the html where you want the pagebreak:

<P CLASS="pagebreakhere">

这篇关于在HTML / ASP强制分页符打开和打印多条记录时,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆