在Repeater控件中的分页符asp.net c# [英] Page Break in a Repeater control asp.net c#

查看:105
本文介绍了在Repeater控件中的分页符asp.net c#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人能建议在示例代码的哪儿插入asp.net中继器中的分页符吗?附加了代码.

Can anyone suggest where to fond example code to insert a page break in an asp.net repeater? Code attached.

推荐答案

在网络上? 插入分页符中继器 [ ^ ]
On web? Top link in Google search[^] for the same:
Insertion of a page break in a repeater[^]


Protected Sub rpt_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.RepeaterItemEventArgs) Handles rpt.ItemDataBound
        If e.Item.ItemType = ListItemType.Item Then
            Dim row As Data.DataRowView = CType(e.Item.DataItem, Data.DataRowView)
            If Not e.Item.ItemIndex = row.DataView.Count Then
                Dim l As New Literal
                l.Text = "<hr size=''1'' style=''PAGE-BREAK-AFTER: right; color: #FFFFFF;''>"
                e.Item.Controls.Add(l)
            End If
        End If
    End Sub



希望这可以帮到你.这段代码在VB.Net中.将其转换为C#.



Hope this can help you. This code is in VB.Net. Convert it to C#.


该代码不起作用,任何人都不能提供解决方案
this code doesnt work can any one provide the solution for this problem


这篇关于在Repeater控件中的分页符asp.net c#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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