页码计算

 public class PagingInfo
    {
        //总的商品个数
        public int TotalItems { get; set; }

        //一页有多少商品
        public int ItemsPerPage { get; set; }

        //当前页码
        public int CurrentPage { get; set; }

        //总共 有多少页数
        public int TotalPages { get { return (int)Math.Ceiling((decimal)TotalItems/ItemsPerPage); } }
    }
原文地址:https://www.cnblogs.com/158-186/p/10892682.html