how to apply paging on a list

后端 未结 3 1972
渐次进展
渐次进展 2020-12-30 04:31

I have a function that retrieves data from database and add it into list. My list is ready and shows the data but i want paging on that list so that it shows limited records

3条回答
  •  無奈伤痛
    2020-12-30 05:36

    Skip and Take extension methods fits your needs.I don't know how is your page structure but you can use a simple for loop to get values like this:

    int recordPerPage = 20;
    for(int i=0; i

提交回复
热议问题