I am not able to get the desired result from a post that I am following to implement on my website. I want to do paging using the repeater control.
I am referring to this method (post) for implementing the (post of c sharp corner)
Description of problem:
- I don't want to implement the stored procedure feature hence I have only followed this post till step number # 3.
I have set the page size as 1 and I have 4 records in the database.
The paging repeater (repeater1 as per the code) has correctly shown 4 pages
Problem is that when the last page is clicked it shows no result. To explain the exact problem, I have made the incorrect code live on this link.
A list of all 4 posts can be viewed on this link. (scroll till the bottom of the page)
What might be the main issue which is causing this issue?
Steps taken by me: 1. I have tried setting the pdsData.CurrentPageIndex = 0; to 1 at row # 41 (step 3) - problem not solved 2. I tried setting
ViewState["PageNumber"] = Convert.ToInt32(e.CommandArgument);
as
ViewState["PageNumber"] = Convert.ToInt32(e.CommandArgument)+1;
problem is still the same (row number 61 or step 3)
I am open to alternatives to achieving an efficient paging using repeater control. I am using asp.net version 4.5.