a) Create a property in your page that holds the page number that you are currently in. Let's call it "CurrentPageNumber". In order to persist the value across postbacks, let's use viewstate.
{
get
{
object o = this.ViewState["_ CurrentPageNumber"];
if (o == null) return 0;
else return (int) o;
}
set
{
ViewState["_ CurrentPageNumber"] = value;
}
b) Add the navigation buttons : Previous, Next
You can set up links to the same page with page numbers as Querystring and in page_load event capture them.
Other way is to update the PagedDataSource with the right page number and rebind it to the Repeater. On the Previous button click you would do this:
pds .CurrentPageIndex = CurrentPageNumber- 1;
//bind the PagedDataSource to the Repeater.
myRepeater.DataSource = pds;
myRepeater.DataBind();
And on NextButton click, you would move to next page. Like:
pds .CurrentPageIndex = CurrentPageNumber+ 1;
//bind the PagedDataSource to the Repeater.
myRepeater.DataSource = pds;
myRepeater.DataBind();