PageAdmin网站内容管理系统(CMS)交流论坛

注册

 

QQ登录

只需一步,快速开始

发新话题 回复该主题

如何去修改? [复制链接]

1#

@using System.Collections.Specialized;
@functions{
    //默认分页函数

    private string Pagebreak(int page, string urlPrefix, string urlParams = "")
    {
        string rv = "";
        if (page > 1)
        {
            rv = urlPrefix + page + "/";
        }
        else
        {
            rv = urlPrefix;
        }
        rv += urlParams;
        return rv;
    }

    private string GetUrlParams()
    {
        string rv = "";
        NameValueCollection queryStrings = Request.QueryString;
        int count = queryStrings.Count;
        if (count > 0)
        {
            rv = "?";
        }
        foreach (string key in queryStrings)
        {
            if (rv.IndexOf("=") > 0)
            {
                rv += "&";
            }
            rv += key + "=" + HttpUtility.UrlEncode(queryStrings[key]);
        }
        return rv;
    }
}
@{
    PageInfo pageInfo = (PageInfo)Model;
    int pageCount = pageInfo.PageCount;
    int pageSize = pageInfo.PageSize;
    int recordCount = pageInfo.RecordCount;
    int currentPage = pageInfo.CurrentPage;
    int m = 2; //左右两边显示页码数
    string urlParams = GetUrlParams();
    string urlPrefix;
    if (ViewData.ContainsKey("path"))
    {
        urlPrefix = (string)ViewData["path"];
    }
    else
分享 转发
TOP
2#

笔记本的额样式添加以上代码、按照以下图片覆盖替换

TOP
发新话题 回复该主题