Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Friends,
I have one datalist in a web page to display list of products that i have binded with ado.net,Its working fine.Now my problem is how to display no of items in that page.Suppose i have total of 18 products under a particular category.I have to dispaly in 1st page of datalist like
1 to 6 of 18 produts and in 2nd page 7 to 12 of 18 and 3rd page 13 to 18 of 18 so on... I did paging in that datalist. Please reply me soon.
Posted

1 solution

See some good links which will help you lot After this rest of ideas you have to implement in your code, Then if you will face problem anybody will help you
Paging in datalist in asp.net[^]

http://www.aspdotnetcodes.com/DataList_Dynamic_Paging_PagedDataSource.aspx[^]
http://www.c-sharpcorner.com/uploadfile/rizwan328/datalist-custom-paging-in-Asp-Net-using-C-Sharp/[^]
 
Share this answer
 
Comments
SanSkun 6-Apr-14 0:41am    
Hi Sankarsan Parida,
I don't want to show no of pages like 1 of 20 pages.I want no of products per page.Suppose i have total of 20 products per page then and each page shows 6 products,then it has to show like displaying 1 to 6 of 20 products in 1 page of datalist.Then in 2nd page 7 to 12 of 20 products then in 3 rd page of datalist 13 to 18 of 20 and so on... like this.Please help me out .
[no name] 6-Apr-14 1:10am    
So where is the problem put a dropdownlist with fix page size value 6, 10, 20, 50, 100 like this. Make a pagination with your dropdownlist selection. Simple where your page size will depend your dropdownlist selectionValue.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900