使用动态创建的html表进行分页 [英] Paging by using dynamically created html table

查看:114
本文介绍了使用动态创建的html表进行分页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为网站的在线销售进行编码.我要显示产品的主页上有一个问题.我定义了一个包含4列的表格,但是有100多种产品,因此需要分页.

I am coding online sales for a website. I have a problem on my main page where I would like to show products. I defined a table with 4 columns, but there are over than a 100 products and I need paging for that.

如何实现每页20个产品的分页?

How can I implement paging with 20 products per page?

推荐答案

有许多完成的控件将对您有所帮助,请查看此MSDN文章:

There are a lot of finished controls that will help you on the way, check this MSDN Article out: Creating a Pager Control for ASP.NET

您还可以查看众多jQuery Pagers中的一个,但是,如果您使用jQuery解决方案,则所有行将始终被加载.如果对它使用一些预构建的ASP.NET控件,它将仅获取每个页面所需的元素数.

You could also check out one of the many jQuery Pagers out there, however if you use the jQuery solution all the rows will always be loaded. If you use some pre-built ASP.NET control for it, it will only fetch the number of elements you desire for each page.

这篇关于使用动态创建的html表进行分页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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