private void ItemsGet() { // Read sample item info from XML document into a DataSet try { // Populate the repeater control with the Items DataSet // FlightManager _flightManger = new FlightManager(); Flights _flightManger = new Flights(); PagedDataSource objPds = new PagedDataSource(); objPds.DataSource = _flightManger.GetFlightsCollectionForAirline(); objPds.AllowPaging = true; objPds.PageSize = 3; objPds.CurrentPageIndex = CurrentPage; lblCurrentPage.Text = "Page: " + (CurrentPage + 1).ToString() + " of " + objPds.PageCount.ToString(); // Disable Prev or Next buttons if necessary commandPrevious.Enabled = !objPds.IsFirstPage; commandNext.Enabled = !objPds.IsLastPage; dlFlight.DataSource = objPds; dlFlight.DataBind(); } catch (FlightManagerException ex) { throw ex; } }