Repeater a method for displaying delimiters at multiple lines of space.
This example uses Vs.net (C #) to write the background. CS code. From admin10000.com
protected void Page_Load (object sender, EventArgs e) {if (! Page.IsPostBack) {Rptlist.datasource = GetTable (); Rptlist.databind (); }} protected void Rptlist_itemdatabound (object sender, RepeaterItemEventArgs e) {if (E.I Tem. ItemType = = ListItemType.AlternatingItem | | E.item.itemtype = = ListItemType.Item) {DataRowView DRV = (DataRowView) e.Item.DataItem; Literal Ltltitle = (Literal) e.item.findcontrol ("Ltltitle"); Ltltitle.text = DRV. row["title"]. ToString (); if ((E.item.itemindex + 1)% 5 = = 0 && (e.item.itemindex + 1) <) {System. Web.UI.LiteralControl ul = new LiteralControl ("</ul><p class=\" sep\ "></p><ul>"); E.item.controls.add (UL); }}} DataTable GetTable () {DatatAble dt = new DataTable (); Dt. Columns.Add ("title", typeof (String)); for (int i = 1; i <=; i++) {DataRow row = dt. NewRow (); row["title"] = "This is the article title" + i + ""; Dt. Rows.Add (row); } return DT; }
Front-desk. aspx code
<form id= "Form1" runat= "Server" > <p> <asp:repeater id= "rptlist" runat= "Server" onitemdatabound= "Rptlist_itemdatabound" > <HeaderTemplate> <ul>
Download code example: Pagedemo.rar
Related documents: pagination implementation of the Repeater control Repeater control implementation Edit, update, delete operations repeater nested using repeater