在每一个页面要10行同时绑定到一个中继器 [英] Want 10 rows in every page while binding to a repeater

查看:89
本文介绍了在每一个页面要10行同时绑定到一个中继器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这势必将有500 rows.I不希望它寻呼数据源的中继器。
简单的当行来他们成长down.So中继器,假设我有10页,具有浏览器打印preVIEW 50行,每行页面,当我打印的文档使用Ctrl + p命令。

I have a repeater which is bound to a data source having 500 rows.I don't want it for paging. Simple when the rows are coming to repeater they grow down.So ,suppose i have 10 pages, each page having 50 rows in the browser print preview, when i am printing the document with ctrl+p command.

那么,有没有什么办法,让自己的页面将只包含10行,并在每一页的页眉和页脚。

so,is there any way , so that my page will contain only 10 rows and with header and footer in every page.

谢谢
玛纳斯

推荐答案

您可以添加中继器那么,如果写调用之内,也使用的是公共的整数值从code的后面,因为:

You can add inside the repeater an if, then, Write call, using also a public integer value from code behind, as:

public int ImetritisReapeter = 1;

在页面上:

<asp:Repeater ID="rMyID" runat="server">
  <ItemTemplate>
    <% if (ImetritisReapeter++ % 10 == 0) { 
        Response.Write("<br>Extra header ever 10 lines");
    } %>
  </ItemTemplate>
</asp:Repeater>

这篇关于在每一个页面要10行同时绑定到一个中继器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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