TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Pothi Sam
NA
335
50.7k
Repeater Pagination For Bulk Record
Apr 15 2020 1:52 AM
Repeater Pagination For Bulk Record I Need pageination For 10 Recordes Example i Select page 5 maximum page is 10 Minumn page is 1. if i Select page 17 Maximum Page is 22 minimum page is 12
private
void
BindPager(
int
totalRecordCount,
int
currentPageIndex,
int
pageSize)
{
double
getPageCount = (
double
)((
decimal
)totalRecordCount / (
decimal
)pageSize);
int
pageCount = (
int
)Math.Ceiling(getPageCount);
List<ListItem> pages =
new
List<ListItem>();
if
(pageCount > 1)
{
pages.Add(
new
ListItem(
"FIRST"
,
"1"
, currentPageIndex > 1));
for
(
int
i = 1; i <= pageCount; i++)
{
pages.Add(
new
ListItem(i.ToString(), i.ToString(), i != currentPageIndex + 1));
}
pages.Add(
new
ListItem(
"LAST"
, pageCount.ToString(), currentPageIndex < pageCount - 1));
}
rptPager.DataSource = pages;
rptPager.DataBind();
}
Reply
Answers (
1
)
All Rating display Scored with Bar design in asp.net C#
How to split intersected Labels in Windows Forms C#.Net?