使用ajax和asp.net mvc进行分页

时间:2022-11-30 16:32:19

i have a query that returns large sets of records which i render on the view. I would like to add paging so i only show 10 records at a time. I also want it so when i click next, i just get the next 10 records without refreshing the whole page. what is the best way to do that using ajax to avoid redownloading all of my website images and header if i am only wanting to change the content of the list of data.

我有一个查询返回我在视图上呈现的大量记录。我想添加分页,所以我一次只显示10条记录。我也想要它,所以当我点击下一步,我只是得到接下来的10条记录而不刷新整个页面。如果我只想更改数据列表的内容,使用ajax避免重新加载我的所有网站图像和标题的最佳方法是什么。

3 个解决方案

#1


4  

That is covered in depth in the NerdDinner walkthrough. Here's a link to a C# Corner article that references it heavily and takes you on a step-by-step walkthrough of implementing paging.

在NerdDinner演练中深入讨论了这一点。这是一篇C#Corner文章的链接,该文章大量引用它,并带您逐步实现分页。

#2


0  

This should help ajax and asp.net mvc

这应该有助于ajax和asp.net mvc

#3


0  

Check this out for simple ajax paging : simple ajax paging

检查这个简单的ajax分页:简单的ajax分页

#1


4  

That is covered in depth in the NerdDinner walkthrough. Here's a link to a C# Corner article that references it heavily and takes you on a step-by-step walkthrough of implementing paging.

在NerdDinner演练中深入讨论了这一点。这是一篇C#Corner文章的链接,该文章大量引用它,并带您逐步实现分页。

#2


0  

This should help ajax and asp.net mvc

这应该有助于ajax和asp.net mvc

#3


0  

Check this out for simple ajax paging : simple ajax paging

检查这个简单的ajax分页:简单的ajax分页