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
Hope this can help you. This code is in VB.Net. Convert it to C#.