带有 ASP.NET MVC 和 AJAX 的分页表 [英] Paged table with ASP.NET MVC and AJAX

查看:30
本文介绍了带有 ASP.NET MVC 和 AJAX 的分页表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找在 ASP.NET MVC 中通过 AJAX 提供的排序、过滤和分页实现结果分页表的良好模式.在我看来,我应该让我的控制器操作只提供数据而不是标记来维护关注点的分离——所以 Ajax 回调将提供新的表数据和分页器设置,客户端将使用它们来重新呈现表.或者,我可以使用控制器返回一个局部视图,我只需将其替换在页面上的容器内即可.

I'm looking for good patterns for implementing a paged table of results in ASP.NET MVC with sorting, filtering, and paging provided via AJAX. It seems to me that I should have my controller actions provide only the data and not mark up to maintain the separation of concerns -- so the Ajax callback would provide new table data and pager settings which the client would use to re-render the table. Alternatively, I could use have the controller return a partial view that I simply replace inside a container on the page.

我是 ASP.NET MVC 世界的新手,所以我也有兴趣听取意见和其他替代方案.

I'm new to the ASP.NET MVC world, so I'd be interested in hearing opinions and other alternatives as well.

你会怎么做?

我也有兴趣了解与 Ajax 配合良好的 jquery 表插件.

I'm also interested in hearing about jquery table plugins that work well with Ajax.

推荐答案

这里有几个结帐选项:

我倾向于 Yahoo 的解决方案 atm,因为它提供的不仅仅是网格控件.

I'm leaning towards Yahoo's solution atm since it offers much more than just a grid control.

这篇关于带有 ASP.NET MVC 和 AJAX 的分页表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆