Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 28, 2012 02:32 AM by asteranup
Member
20 Points
13 Posts
Nov 25, 2012 07:16 AM|LINK
Hello..
I have created a custom pagination in asp.net with out using gridview and now I have the page numbers that grow with number of result set grow
void populatePages(int intNoPages) { int count = 1; int Lastpages = 0; lblPages.Text = string.Empty; if (intNoPages > 1) { lblPages.Text += "<a href=AdminPanel.aspx?p=" + count + " class='button'>First</a> "; for (count = 1; count <= intNoPages; count++) { lblPages.Text += "<a href=AdminPanel.aspx?p=" + count + " class='button'>" + count + "</a> "; Lastpages += count; } lblPages.Text += "<a href=AdminPanel.aspx?p=" + (Lastpages - 1) + " class='button'>Last</a> "; } else { lblPages.Text += "<a href=AdminPanel.aspx?p=1 class='button'>1</a> "; } }
when the number of returned record groth number of pages increase from 1 to 20 and make very ugly and tricky I want a jquery to make label that show page number only display 10 number at a time and have next-preview.
Thank you
Star
14859 Points
1525 Posts
Microsoft
Nov 28, 2012 01:36 AM|LINK
Hi danarj,
You can use jQuery Pagination Plugin for this, please refer
http://archive.plugins.jquery.com/project/pagination
http://www.jqueryrain.com/2012/04/best-ajax-jquery-pagination-plugin-tutorial-with-example-demo/
Hope this helps, thanks.
All-Star
30184 Points
4906 Posts
Nov 28, 2012 02:32 AM|LINK
Hi,
You can use any datatable plugin like datatable.net or jqgrid.
danarj
Member
20 Points
13 Posts
pagination by jquery
Nov 25, 2012 07:16 AM|LINK
Hello..
I have created a custom pagination in asp.net with out using gridview and now I have the page numbers that grow with number of result set grow
void populatePages(int intNoPages) { int count = 1; int Lastpages = 0; lblPages.Text = string.Empty; if (intNoPages > 1) { lblPages.Text += "<a href=AdminPanel.aspx?p=" + count + " class='button'>First</a> "; for (count = 1; count <= intNoPages; count++) { lblPages.Text += "<a href=AdminPanel.aspx?p=" + count + " class='button'>" + count + "</a> "; Lastpages += count; } lblPages.Text += "<a href=AdminPanel.aspx?p=" + (Lastpages - 1) + " class='button'>Last</a> "; } else { lblPages.Text += "<a href=AdminPanel.aspx?p=1 class='button'>1</a> "; } }when the number of returned record groth number of pages increase from 1 to 20 and make very ugly and tricky I want a jquery to make label that show page number only display 10 number at a time and have next-preview.
Thank you
Yanping Wang...
Star
14859 Points
1525 Posts
Microsoft
Re: pagination by jquery
Nov 28, 2012 01:36 AM|LINK
Hi danarj,
You can use jQuery Pagination Plugin for this, please refer
http://archive.plugins.jquery.com/project/pagination
http://www.jqueryrain.com/2012/04/best-ajax-jquery-pagination-plugin-tutorial-with-example-demo/
Hope this helps, thanks.
Feedback to us
Develop and promote your apps in Windows Store
asteranup
All-Star
30184 Points
4906 Posts
Re: pagination by jquery
Nov 28, 2012 02:32 AM|LINK
Hi,
You can use any datatable plugin like datatable.net or jqgrid.
Anup Das Gupta
Mark as Answer if you feel so. Visit My Blog