This tutorial will show you how to page Repeater using ASP.NET 2.0 and C#.NET .First, you need to import the System.Data.SqlClient namespace.

We use the Page_Load event to display data. And use the btnStart_Click event to display the first page. We use the btnBack_Click event to display the previous page, and use the btnGo_Click event to display the next page,use the btnEnd_Click event to display the last page.

The Repeater is a basic templated data-bound list. It has no built-in layout or styles, so you must explicitly declare all HTML layout, formatting, and style tags within the control’s templates.The Repeater is the only control that allows the developers to split HTML tags across the templates. To create a table using templates, include the begin table tag in the HeaderTemplate, a single table row tag in the ItemTemplate, and the end table tag in the FooterTemplate.The Repeater has no built-in selection or editing support. The user may use the ItemCommand event to process control events that are raised from the templates to the control.A Repeater binds its ItemTemplate and AlternatingItemTemplate to a data model declared and referenced by its DataSource property. The HeaderTemplate, FooterTemplate, and SeparatorTemplate are not data-bound.If the data source of the Repeater is set but no data is returned, the control renders the HeaderTemplate and FooterTemplate with no items. If the data source is a null reference (Nothing in Visual Basic), the Repeater is not rendered.

The front end Default.aspx page looks something like this:

The flow for the code behind page is as follows.

Download Source Files